mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
fix rewriter crashes (this code is bad)
This commit is contained in:
parent
7d94d54108
commit
c4f31be3ae
2 changed files with 3 additions and 1 deletions
|
@ -81,7 +81,8 @@ function traverseParsedHtml(node, origin?: URL) {
|
|||
node.attribs.content.includes("url")
|
||||
) {
|
||||
const contentArray = node.attribs.content.split("url=");
|
||||
contentArray[1] = encodeUrl(contentArray[1].trim(), origin);
|
||||
if (contentArray[1])
|
||||
contentArray[1] = encodeUrl(contentArray[1].trim(), origin);
|
||||
node.attribs.content = contentArray.join("url=");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue