about summary refs log tree commit diff
path: root/app/validators/html_validator.rb
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-01-26 16:42:38 -0600
committerStarfall <us@starfall.systems>2021-01-26 16:42:38 -0600
commit3ef928029d94a2b3c6abf96a2935de85c4eed6c8 (patch)
treed8697b527a0a42e51634b1fef68f0162fe2ccbe2 /app/validators/html_validator.rb
parent65263e6309fb4dea1a93d4b4806af629d317c156 (diff)
parent52ff3ca675ecac0ff32990b6321fb5e349e6dc59 (diff)
Merge remote-tracking branch 'glitchsoc/main' into main
Diffstat (limited to 'app/validators/html_validator.rb')
-rw-r--r--app/validators/html_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/html_validator.rb b/app/validators/html_validator.rb
index 1c9cd303c..b85b9769f 100644
--- a/app/validators/html_validator.rb
+++ b/app/validators/html_validator.rb
@@ -15,6 +15,6 @@ class HtmlValidator < ActiveModel::EachValidator
 
   def html_errors(str)
     fragment = Nokogiri::HTML.fragment(options[:wrap_with] ? "<#{options[:wrap_with]}>#{str}</#{options[:wrap_with]}>" : str)
-    fragment.errors.select { |error| ERROR_RE =~ error.message }
+    fragment.errors.select { |error| ERROR_RE.match?(error.message) }
   end
 end