mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
do not create global variables
This commit is contained in:
parent
6de1fed87a
commit
e8c1a81e87
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue