Fix #3139: XSS in Related Tags javascript.

This commit is contained in:
evazion
2017-06-09 20:33:19 -05:00
parent 30fc9c93c3
commit 5f9fce7343

View File

@@ -227,14 +227,10 @@
if (text.match(/^ http/)) {
text = text.substring(1, 1000);
var $url = $("<a/>");
$url.text("open");
$url.text(text);
$url.attr("href", text);
$url.attr("target", "_blank");
var $li = $("<li/>");
$li.append(text + " [");
$li.append($url);
$li.append("]");
$ul.append($li);
$ul.append($("<li/>").html($url));
} else {
$ul.append($("<li/>").text(text));
}