Parse style attributes for absolute URL paths (#5)
This commit is contained in:
committed by
yz-yu
parent
c6552fbcca
commit
61c50c2122
@@ -105,6 +105,8 @@ function serializeNode(n: Node, doc: Document): serializedNode | false {
|
|||||||
// relative path in attribute
|
// relative path in attribute
|
||||||
if (name === 'src' || name === 'href') {
|
if (name === 'src' || name === 'href') {
|
||||||
attributes[name] = absoluteToDoc(doc, value);
|
attributes[name] = absoluteToDoc(doc, value);
|
||||||
|
} else if (name === 'style') {
|
||||||
|
attributes[name] = absoluteToStylesheet(value, doc.location.href);
|
||||||
} else {
|
} else {
|
||||||
attributes[name] = value;
|
attributes[name] = value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user