Pārlūkot izejas kodu

Merge pull request #3641 from chrisi51/master

change url scheme recognition for allowing abasurl to link
Lauri Ojansivu 4 gadi atpakaļ
vecāks
revīzija
77372ccce1
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      packages/markdown/src/template-integration.js

+ 1 - 1
packages/markdown/src/template-integration.js

@@ -37,7 +37,7 @@ function mySafeAttrValue(tag, name, value, cssFilter) {
   // then use your custom function
   // then use your custom function
   if (tag === 'a' && name === 'href') {
   if (tag === 'a' && name === 'href') {
     // only filter the value if starts with an registered url scheme
     // only filter the value if starts with an registered url scheme
-    urlscheme = value.split(/:\/\//);
+    urlscheme = value.split(/:/);
     //console.log("validating "+urlscheme[0]);
     //console.log("validating "+urlscheme[0]);
     if(urlschemes.includes(urlscheme[0])) return value;
     if(urlschemes.includes(urlscheme[0])) return value;
     else {
     else {