about summary refs log tree commit diff
path: root/app/validators/html_validator.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2021-01-26 23:21:32 +0100
committerGitHub <noreply@github.com>2021-01-26 23:21:32 +0100
commit52ff3ca675ecac0ff32990b6321fb5e349e6dc59 (patch)
treeeeeeeead25872b19b34b31e3ccbd543d3e2fd9b8 /app/validators/html_validator.rb
parentca6c62068e35537251cc650c8b2d03a1a2163d06 (diff)
parent00e55445b9aa5a399a9f8b76e42fde9da2c399fd (diff)
Merge pull request #1491 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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