From a50712ea8085bb25c062252fe31cf90d7bd00d03 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sun, 3 Apr 2022 15:48:40 -0400 Subject: [PATCH] fix: handle links to same host but different port as external --- server/modules/rendering/html-core/renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/rendering/html-core/renderer.js b/server/modules/rendering/html-core/renderer.js index 15ac8db5..d4700530 100644 --- a/server/modules/rendering/html-core/renderer.js +++ b/server/modules/rendering/html-core/renderer.js @@ -50,7 +50,7 @@ module.exports = { } // -> Strip host from local links - if (isHostSet && href.indexOf(WIKI.config.host) === 0) { + if (isHostSet && href.indexOf(`${WIKI.config.host}/`) === 0) { href = href.replace(WIKI.config.host, '') }