escape html for related tags form

This commit is contained in:
Toks
2013-05-05 20:31:07 -04:00
parent 357332a506
commit c1371eb0a2
2 changed files with 4 additions and 4 deletions

View File

@@ -57,7 +57,7 @@
var link = $("<a/>");
var count = $("<span/>");
link.html(entry.tags);
link.text(entry.tags);
link.click(Danbooru.Blacklist.toggle_entry);
count.html(entry.hits);
item.append(link);

View File

@@ -164,7 +164,7 @@
var $ul = $("<ul/>");
$ul.append(
$("<li/>").append(
$("<em/>").html(
$("<em/>").text(
query.replace(/_/g, " ")
)
)
@@ -173,7 +173,7 @@
$.each(related_tags, function(i, tag) {
if (tag[0][0] !== " ") {
var $link = $("<a/>");
$link.html(tag[0].replace(/_/g, " "));
$link.text(tag[0].replace(/_/g, " "));
$link.addClass("tag-type-" + tag[1]);
$link.attr("href", "/posts?tags=" + encodeURIComponent(tag[0]));
$link.click(Danbooru.RelatedTag.toggle_tag);
@@ -184,7 +184,7 @@
$("<li/>").append($link)
);
} else {
$ul.append($("<li/>").html(tag[0]));
$ul.append($("<li/>").text(tag[0]));
}
});