bugfix: svg url中id name被误转为绝对路径 (#59)

Co-authored-by: wanglei002 <wanglei002@sensorsdata.cn>
This commit is contained in:
丶Cccccc
2021-01-16 21:22:45 +08:00
committed by GitHub
parent e1c90aae9a
commit 98cc4ee709

View File

@@ -66,7 +66,7 @@ function extractOrigin(url: string): string {
}
const URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm;
const RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
const RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/;
const DATA_URI = /^(data:)([^,]*),(.*)/i;
export function absoluteToStylesheet(
cssText: string | null,