From f67a174c4a7706a2d419ba3dd43d696104f90696 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Tue, 26 Oct 2021 01:50:28 +0300 Subject: [PATCH] Re-enables custom schemes auto linking. Thanks to chrisi51 ! Related https://github.com/wekan/wekan/pull/4059 --- packages/markdown/src/template-integration.js | 64 ++----------------- 1 file changed, 4 insertions(+), 60 deletions(-) diff --git a/packages/markdown/src/template-integration.js b/packages/markdown/src/template-integration.js index fbc64732b..0f4437e74 100755 --- a/packages/markdown/src/template-integration.js +++ b/packages/markdown/src/template-integration.js @@ -9,8 +9,6 @@ var Markdown = require('markdown-it')({ import markdownItMermaid from "@wekanteam/markdown-it-mermaid"; -/* - // Static URL Scheme Listing var urlschemes = [ "aodroplink", @@ -23,74 +21,20 @@ var urlschemes = [ "mailspring" ]; + + // Better would be a field in the admin backend to set this dynamically // instead of putting all known or wanted url schemes here hard into code // but i was not able to access those settings // var urlschemes = currentSetting.automaticLinkedUrlSchemes.split('\n'); + + // put all url schemes into the linkify configuration to automatically make it clickable for(var i=0; i`; - } else { - // use the default safeAttrValue function to process it - return sanitizeXss.safeAttrValue(tag, name, value, cssFilter); - } -}; -*/ - var emoji = require('markdown-it-emoji'); Markdown.use(emoji); Markdown.use(markdownItMermaid);