dont add target=_blank to link to other notes

This commit is contained in:
Laila van Reenen 2025-02-10 21:17:49 +01:00
parent dee1b56311
commit 7fa5bdcc7c
Signed by: LailaTheElf
GPG Key ID: 8A3EF0226518C12D

View File

@ -573,7 +573,7 @@ export function postProcess (code) {
// link should open in new window or tab
// also add noopener to prevent clickjacking
// See details: https://mathiasbynens.github.io/rel-noopener/
result.find('a:not([href^="#"]):not([target])').attr('target', '_blank').attr('rel', 'noopener')
result.find('a:not([href^="#"]):not([href^="/"]):not([target])').attr('target', '_blank').attr('rel', 'noopener')
// If it's hashtag link then make it base uri independent
result.find('a[href^="#"]').each((index, linkTag) => {