From 7fa5bdcc7c840182ef69eff9ca6e12a0e46e2db5 Mon Sep 17 00:00:00 2001 From: LailaTheElf Date: Mon, 10 Feb 2025 21:17:49 +0100 Subject: [PATCH] dont add target=_blank to link to other notes --- public/js/extra.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/extra.js b/public/js/extra.js index 210f8da9..ec19e11f 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -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) => {