瀏覽代碼

change url scheme recognition for allowing abasurl to link

autolinking is not working for abasurl as it contains not url conform characters so you would still have to link it manually but it is not sanitized anymore.
Christian Hillebrand 4 年之前
父節點
當前提交
fdb4980b68
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
   if (tag === 'a' && name === 'href') {
     // only filter the value if starts with an registered url scheme
-    urlscheme = value.split(/:\/\//);
+    urlscheme = value.split(/:/);
     //console.log("validating "+urlscheme[0]);
     if(urlschemes.includes(urlscheme[0])) return value;
     else {