Skip to content

Commit 98cc4ee

Browse files
leosswwanglei002
andauthored
bugfix: svg url中id name被误转为绝对路径 (#59)
Co-authored-by: wanglei002 <wanglei002@sensorsdata.cn>
1 parent e1c90aa commit 98cc4ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/snapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function extractOrigin(url: string): string {
6666
}
6767

6868
const URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm;
69-
const RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
69+
const RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/;
7070
const DATA_URI = /^(data:)([^,]*),(.*)/i;
7171
export function absoluteToStylesheet(
7272
cssText: string | null,

0 commit comments

Comments
 (0)