mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
fix: stop logging encoded urls in css rewriter
This commit is contained in:
parent
85aa136fe0
commit
1b509b2c8a
1 changed files with 6 additions and 3 deletions
|
@ -16,8 +16,9 @@ function handleCss(type: "rewrite" | "unrewrite", css: string, meta?: URLMeta) {
|
|||
css = new String(css).toString();
|
||||
css = css.replace(urlRegex, (match, url) => {
|
||||
const encodedUrl =
|
||||
type === "rewrite" ? rewriteUrl(url, meta) : unrewriteUrl(url);
|
||||
console.log(encodedUrl);
|
||||
type === "rewrite"
|
||||
? rewriteUrl(url.trim(), meta)
|
||||
: unrewriteUrl(url.trim());
|
||||
|
||||
return match.replace(url, encodedUrl);
|
||||
});
|
||||
|
@ -31,7 +32,9 @@ function handleCss(type: "rewrite" | "unrewrite", css: string, meta?: URLMeta) {
|
|||
return match;
|
||||
}
|
||||
const encodedUrl =
|
||||
type === "rewrite" ? rewriteUrl(url, meta) : unrewriteUrl(url);
|
||||
type === "rewrite"
|
||||
? rewriteUrl(url.trim(), meta)
|
||||
: unrewriteUrl(url.trim());
|
||||
|
||||
return `${firstQuote}${encodedUrl}${endQuote}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue