Merge pull request #253 from codl/fix/bold+color+url

Fix urls preventing proper closure of bold and color tags
This commit is contained in:
Mattias Erming 2014-10-27 22:48:45 +01:00
commit 277887382c
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -41,8 +41,8 @@ function uri(text) {
} }
var split = url.split("<"); var split = url.split("<");
url = "<a href='" + split[0].replace(/^www/, "//www") + "' target='_blank'>" + split[0] + "</a>"; url = "<a href='" + split[0].replace(/^www/, "//www") + "' target='_blank'>" + split[0] + "</a>";
if (split[1]) { if (split.length > 1) {
url += "<" + split[1]; url += "<" + split.slice(1).join("<");
} }
return url; return url;
}); });