black list tag fix

This commit is contained in:
albert
2013-02-17 02:28:27 -05:00
parent 06e941fd0a
commit 0d8447fa82
2 changed files with 2 additions and 3 deletions

View File

@@ -4,8 +4,7 @@
Danbooru.Blacklist.blacklists = [];
Danbooru.Blacklist.parse_entries = function() {
var raw = $('<textarea/>').html(Danbooru.meta("blacklisted-tags") || "[]").val();
var entries = ($.parseJSON(raw)).replace(/(rating:[qes])\w+/, "$1").split(/,/);
var entries = j(Danbooru.meta("blacklisted-tags") || "[]").replace(/(rating:[qes])\w+/, "$1").split(/,/);
$.each(entries, function(i, tags) {
var blacklist = {
"tags": tags,

View File

@@ -9,7 +9,7 @@
<meta name="current-user-id" content="<%= CurrentUser.id %>">
<meta name="user-comment-threshold" content="<%= CurrentUser.comment_threshold %>">
<% unless CurrentUser.user.blacklisted_tags.blank? %>
<meta name="blacklisted-tags" content="<%= CurrentUser.user.blacklisted_tag_array.to_json %>">
<meta name="blacklisted-tags" content="<%= CurrentUser.user.blacklisted_tags.gsub(/\n|\r/, ",") %>">
<% end %>
<% if flash[:notice] =~ /error/ %>
<meta name="errors" content="true">