From 947f973d400b5fcb2beb3057eb162f4229945db6 Mon Sep 17 00:00:00 2001 From: Toks Date: Mon, 6 Apr 2015 10:30:43 -0400 Subject: [PATCH] Fix bugged safebooru regex Rather than matching exact tags, it would match something like grapes as rape --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index 32a802910..d6ea04b19 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -668,7 +668,7 @@ class Post < ActiveRecord::Base end def has_tag?(tag) - !!(tag_string =~ /(?:^| )#{tag}(?:$| )/) + !!(tag_string =~ /(?:^| )(?:#{tag})(?:$| )/) end def has_dup_tag?