From 66e8d4318ce5eef0c01fb0163482f81564b1c5f2 Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Fri, 23 Nov 2018 23:36:19 +0800 Subject: [PATCH] fix absolute to doc --- src/snapshot.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/snapshot.ts b/src/snapshot.ts index 3acbdb5b..1423f6d9 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -67,11 +67,7 @@ export function absoluteToStylesheet(cssText: string, href: string): string { }); } -const RELATIVE_PATH = /^(\.\.|\.|)\//; function absoluteToDoc(doc: Document, attributeValue: string): string { - if (!RELATIVE_PATH.test(attributeValue)) { - return attributeValue; - } const a: HTMLAnchorElement = doc.createElement('a'); a.href = attributeValue; return a.href;