Fix #4582: Safebooru should not block "censored" tag

* Remove the default list of blocked tags in safe mode.
* Change it so that tags that are blocked in safe mode are filtered out
  at the database level rather than at the html level.
This commit is contained in:
evazion
2022-05-17 02:16:58 -05:00
parent 8239a1b551
commit ce18c866d9
4 changed files with 17 additions and 17 deletions

View File

@@ -1336,6 +1336,7 @@ class Post < ApplicationRecord
# @return [ActiveRecord::Relation<Post>] the set of resulting posts
def user_tag_match(query, user = CurrentUser.user, tag_limit: user.tag_query_limit, safe_mode: CurrentUser.safe_mode?)
post_query = PostQuery.normalize(query, current_user: user, tag_limit: tag_limit, safe_mode: safe_mode)
post_query.validate_tag_limit!
post_query.with_implicit_metatags.posts
end