close
Skip to content

Commit fe8ce98

Browse files
committed
Fix broken rendering of final URL in strict-block page
Related issue: uBlockOrigin/uBOL-home#703
1 parent 7325242 commit fe8ce98

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/js/document-blocked.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ const urlToFragment = raw => {
4141
try {
4242
const fragment = new DocumentFragment();
4343
const url = new URL(raw);
44+
const href = url.href;
4445
const hn = url.hostname;
45-
const i = raw.indexOf(hn);
46+
const i = href.indexOf(hn);
4647
const b = document.createElement('b');
4748
b.append(hn);
48-
fragment.append(raw.slice(0,i), b, raw.slice(i+hn.length));
49+
fragment.append(href.slice(0,i), b, href.slice(i+hn.length));
4950
return fragment;
5051
} catch {
5152
}

0 commit comments

Comments
 (0)