From e57be5597992aafbb6eb0047c4e965de9e52976c Mon Sep 17 00:00:00 2001 From: Jacob Chapel Date: Fri, 6 Feb 2015 00:41:38 -0800 Subject: [PATCH] FIX: Remove g and m flags from autolink regex --- app/assets/javascripts/discourse/dialects/autolink_dialect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/dialects/autolink_dialect.js b/app/assets/javascripts/discourse/dialects/autolink_dialect.js index 57130511b..4f112506b 100644 --- a/app/assets/javascripts/discourse/dialects/autolink_dialect.js +++ b/app/assets/javascripts/discourse/dialects/autolink_dialect.js @@ -3,7 +3,7 @@ a hrefs for them. **/ var urlReplacerArgs = { - matcher: /^((?:https?:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.])(?:[^\s()<>]+|\([^\s()<>]+\))+(?:\([^\s()<>]+\)|[^`!()\[\]{};:'".,<>?«»“”‘’\s]))/gm, + matcher: /^((?:https?:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.])(?:[^\s()<>]+|\([^\s()<>]+\))+(?:\([^\s()<>]+\)|[^`!()\[\]{};:'".,<>?«»“”‘’\s]))/, spaceOrTagBoundary: true, emitter: function(matches) {