From 895faddf82ab3d3c002053ceb4022ce0ea8f27bd Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 16 Aug 2019 23:04:46 -0400 Subject: [PATCH] Prevents linkPreview to match on URLs lead by an equal sign - Prevent automatic link preview matching on inserted image BBCode --- view/js/linkPreview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/js/linkPreview.js b/view/js/linkPreview.js index be5cdd0a9..7644af7fe 100644 --- a/view/js/linkPreview.js +++ b/view/js/linkPreview.js @@ -52,7 +52,7 @@
\
'; var text; - var urlRegex = /(https?\:\/\/|\s)[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})(\/+[a-z0-9_.\:\;-]*)*(\?[\&\%\|\+a-z0-9_=,\.\:\;-]*)?([\&\%\|\+&a-z0-9_=,\:\;\.-]*)([\!\#\/\&\%\|\+a-z0-9_=,\:\;\.-]*)}*/i; + var urlRegex = /(?