Fix bugged safebooru regex

Rather than matching exact tags, it would match something like grapes as
rape
This commit is contained in:
Toks
2015-04-06 10:30:43 -04:00
parent 7a37a9bd76
commit 947f973d40

View File

@@ -668,7 +668,7 @@ class Post < ActiveRecord::Base
end
def has_tag?(tag)
!!(tag_string =~ /(?:^| )#{tag}(?:$| )/)
!!(tag_string =~ /(?:^| )(?:#{tag})(?:$| )/)
end
def has_dup_tag?