fix: debug
This commit is contained in:
parent
9338ee8832
commit
1daf045506
|
@ -18,7 +18,6 @@ export default class URLRewriteFilter implements ContentFilter {
|
||||||
.each((index, element) => {
|
.each((index, element) => {
|
||||||
let attrName = ["a", "link"].includes(tag) ? "href" : "src";
|
let attrName = ["a", "link"].includes(tag) ? "href" : "src";
|
||||||
let urlValue = $(element).attr(attrName);
|
let urlValue = $(element).attr(attrName);
|
||||||
|
|
||||||
if (urlValue) {
|
if (urlValue) {
|
||||||
if (!isICANN(urlValue)) {
|
if (!isICANN(urlValue)) {
|
||||||
if (
|
if (
|
||||||
|
@ -26,9 +25,11 @@ export default class URLRewriteFilter implements ContentFilter {
|
||||||
urlValue.startsWith("../") ||
|
urlValue.startsWith("../") ||
|
||||||
urlValue.startsWith("http")
|
urlValue.startsWith("http")
|
||||||
) {
|
) {
|
||||||
|
console.log("before", urlValue);
|
||||||
if (!urlValue.startsWith("/")) {
|
if (!urlValue.startsWith("/")) {
|
||||||
urlValue = `/${urlValue}`;
|
urlValue = `/${urlValue}`;
|
||||||
}
|
}
|
||||||
|
console.log("after", urlValue);
|
||||||
$(element).attr(attrName, `/browse${urlValue}`);
|
$(element).attr(attrName, `/browse${urlValue}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue