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

Co-authored-by: wanglei002 <wanglei002@sensorsdata.cn>
This commit is contained in:
丶Cccccc
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 451bf457cc
commit 53f51e0e8e

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,