From f26039297f1fcb357a6b75043c68326a8defcbb9 Mon Sep 17 00:00:00 2001 From: sunflower-seed <30289010+sunflower-seed@users.noreply.github.com> Date: Sun, 19 Aug 2018 15:01:34 +0200 Subject: [PATCH 1/2] Update jquery-comments.js Disabling linkify by option --- js/jquery-comments.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/jquery-comments.js b/js/jquery-comments.js index ead0053..a16f5b5 100644 --- a/js/jquery-comments.js +++ b/js/jquery-comments.js @@ -157,6 +157,7 @@ enablePinging: false, enableDeletingCommentWithReplies: false, enableNavigation: true, + enableLinking: true, postCommentOnEnter: false, forceResponsive: false, readOnly: false, @@ -2180,7 +2181,7 @@ getFormattedCommentContent: function(commentModel, replaceNewLines) { var html = this.escape(commentModel.content); - html = this.linkify(html); + if(enableLinking) html = this.linkify(html); html = this.highlightTags(commentModel, html); if(replaceNewLines) html = html.replace(/(?:\n)/g, '
'); return html; @@ -2375,4 +2376,4 @@ comments.init(options || {}, this); }); }; -})); \ No newline at end of file +})); From 731a2066e2b69f268a0e294b858c9446b6045fce Mon Sep 17 00:00:00 2001 From: sunflower-seed <30289010+sunflower-seed@users.noreply.github.com> Date: Sun, 19 Aug 2018 17:10:45 +0200 Subject: [PATCH 2/2] Update jquery-comments.js Added missing statement --- js/jquery-comments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery-comments.js b/js/jquery-comments.js index a16f5b5..5b1b8c0 100644 --- a/js/jquery-comments.js +++ b/js/jquery-comments.js @@ -2181,7 +2181,7 @@ getFormattedCommentContent: function(commentModel, replaceNewLines) { var html = this.escape(commentModel.content); - if(enableLinking) html = this.linkify(html); + if(this.options.enableLinking) html = this.linkify(html); html = this.highlightTags(commentModel, html); if(replaceNewLines) html = html.replace(/(?:\n)/g, '
'); return html;