Fix bugged safebooru regex
Rather than matching exact tags, it would match something like grapes as rape
This commit is contained in:
@@ -668,7 +668,7 @@ class Post < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def has_tag?(tag)
|
def has_tag?(tag)
|
||||||
!!(tag_string =~ /(?:^| )#{tag}(?:$| )/)
|
!!(tag_string =~ /(?:^| )(?:#{tag})(?:$| )/)
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_dup_tag?
|
def has_dup_tag?
|
||||||
|
|||||||
Reference in New Issue
Block a user