From c1ab1dd8c5bd523de0d841401936120f92df06ce Mon Sep 17 00:00:00 2001 From: rugk Date: Sun, 1 Jul 2018 20:22:21 +0200 Subject: [PATCH] Enable auto-linking in Markdown This get's feature-completition to plain-text auto-linking. Fixes https://github.com/PrivateBin/PrivateBin/issues/336 --- js/privatebin.js | 4 +++- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 9c1e91e..e0f9bf8 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -1773,7 +1773,9 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) { var converter = new showdown.Converter({ strikethrough: true, tables: true, - tablesHeaderId: true + tablesHeaderId: true, + simplifiedAutoLink: true, + excludeTrailingPunctuationFromURLs: true }); // let showdown convert the HTML and sanitize HTML *afterwards*! $plainText.html( diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 2f27727..9242cad 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -75,7 +75,7 @@ if ($MARKDOWN): - + diff --git a/tpl/page.php b/tpl/page.php index acf0bdc..13bc84a 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -54,7 +54,7 @@ if ($QRCODE): - +