Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Escape blacklisted terms before you run them as a regexp

  • Loading branch information...
commit f336f374ba4797b5a34b7b67315c7c5a4fbf1683 1 parent b37fa2c
@aditya aditya authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/tasks/sickcity.rake
View
2  lib/tasks/sickcity.rake
@@ -25,7 +25,7 @@ namespace "sickcity" do
if !destroy
Badword.all.each do |badword|
- if text =~ /#{badword.term}/
+ if text =~ /#{Regexp.escape(badword.term)}/
destroy = true
end
break if destroy == true
Please sign in to comment.
Something went wrong with that request. Please try again.