diff --git a/public/js/extra.js b/public/js/extra.js index 91321d4fc..439ee983f 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -847,7 +847,7 @@ const anchorForId = id => { const anchor = document.createElement('a') anchor.ariaHidden = 'true' anchor.className = 'anchor hidden-xs' - anchor.href = `${document.location.origin}${document.location.pathname}#${id}` + anchor.href = new URL(`#${id}`, document.location).toString() anchor.innerHTML = '' anchor.title = id return anchor