mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 23:10:02 -04:00
prettier
This commit is contained in:
parent
fa779017ad
commit
d6dd1d4ca3
20 changed files with 363 additions and 379 deletions
|
@ -50,7 +50,9 @@ for (const attr of attrs) {
|
|||
|
||||
if (["nonce", "integrity", "csp"].includes(attr)) {
|
||||
return;
|
||||
} else if (["src", "data", "href", "action", "formaction"].includes(attr)) {
|
||||
} else if (
|
||||
["src", "data", "href", "action", "formaction"].includes(attr)
|
||||
) {
|
||||
value = encodeUrl(value);
|
||||
} else if (attr === "srcdoc") {
|
||||
value = rewriteHtml(value);
|
||||
|
@ -88,7 +90,9 @@ Element.prototype.setAttribute = new Proxy(Element.prototype.setAttribute, {
|
|||
thisArg.__origattrs[argArray[0]] = argArray[1];
|
||||
if (["nonce", "integrity", "csp"].includes(argArray[0])) {
|
||||
return;
|
||||
} else if (["src", "data", "href", "action", "formaction"].includes(argArray[0])) {
|
||||
} else if (
|
||||
["src", "data", "href", "action", "formaction"].includes(argArray[0])
|
||||
) {
|
||||
argArray[1] = encodeUrl(argArray[1]);
|
||||
} else if (argArray[0] === "srcdoc") {
|
||||
argArray[1] = rewriteHtml(argArray[1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue