mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
do not create global variables
This commit is contained in:
@@ -1275,7 +1275,7 @@ else
|
|||||||
// autolink anything like <http://example.com>
|
// autolink anything like <http://example.com>
|
||||||
|
|
||||||
var replacer = function (wholematch, m1) {
|
var replacer = function (wholematch, m1) {
|
||||||
m1encoded = m1.replace(/\_\_/, '%5F%5F');
|
var m1encoded = m1.replace(/\_\_/, '%5F%5F');
|
||||||
return "<a href=\"" + m1encoded + "\">" + pluginHooks.plainLinkText(m1) + "</a>";
|
return "<a href=\"" + m1encoded + "\">" + pluginHooks.plainLinkText(m1) + "</a>";
|
||||||
}
|
}
|
||||||
text = text.replace(/<((https?|ftp):[^'">\s]+)>/gi, replacer);
|
text = text.replace(/<((https?|ftp):[^'">\s]+)>/gi, replacer);
|
||||||
|
|||||||
Reference in New Issue
Block a user