Escape URIs replaced in messages

This commit is contained in:
Mattias Erming 2014-06-19 12:58:25 +02:00
parent 8fa145b012
commit f5596ea121
1 changed files with 2 additions and 1 deletions

View File

@ -410,9 +410,10 @@ $(function() {
});
text = escape(text);
for (var i in urls) {
var url = escape(urls[i]);
text = text.replace(
"{" + i + "}",
"<a href='" + urls[i].replace(/^www/, "//www") + "' target='_blank'>" + urls[i] + "</a>"
"<a href='" + url.replace(/^www/, "//www") + "' target='_blank'>" + url + "</a>"
);
}
return text;