From 98cc4ee709d9cd9c0fd08b16099d93747c364b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B6Cccccc?= Date: Sat, 16 Jan 2021 21:22:45 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20svg=20url=E4=B8=ADid=20name=E8=A2=AB?= =?UTF-8?q?=E8=AF=AF=E8=BD=AC=E4=B8=BA=E7=BB=9D=E5=AF=B9=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=20(#59)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wanglei002 --- src/snapshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snapshot.ts b/src/snapshot.ts index e23d2a7..3d04acc 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -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,