Explorar o código

fix: handle links to same host but different port as external

NGPixel %!s(int64=3) %!d(string=hai) anos
pai
achega
a50712ea80
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/modules/rendering/html-core/renderer.js

+ 1 - 1
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, '')
       }