fix: more url fixes

This commit is contained in:
Derrick Hammer 2023-11-18 08:54:50 -05:00
parent a50a78ea47
commit f7720f775c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 5 deletions

View File

@ -55,12 +55,10 @@ export default class URLRewriteFilter implements ContentFilter {
if (!isExternal || !isICANN(url)) {
if (!isExternal) {
//@ts-ignore
urlValue = path.join(rUrl.pathname, urlValue);
url = path.join(rUrl.pathname, urlValue);
}
urlValue = `${swUrl.protocol}//${swUrl.hostname}/browse/${rUrl.hostname}${urlValue}`;
console.log(urlValue);
$(element).attr(attrName, urlValue);
url = `${swUrl.protocol}//${swUrl.hostname}/browse/${rUrl.hostname}${urlValue}`;
console.log(url);
}
return `${url} ${descriptor}`;
});