X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..257f4673e1dd86a3704f6a965e5e077283a04a00:/config/initializers/field_error.rb?ds=sidebyside diff --git a/config/initializers/field_error.rb b/config/initializers/field_error.rb index 3ccd1d391..34b224296 100644 --- a/config/initializers/field_error.rb +++ b/config/initializers/field_error.rb @@ -4,6 +4,6 @@ ActionView::Base.field_error_proc = proc do |html_tag, _instance| if class_attr_index html_tag.insert class_attr_index + 7, "field_with_errors " else - html_tag.insert html_tag.index(/\/?>/), ' class="field_with_errors"' + html_tag.insert html_tag.index(%r{/?>}), ' class="field_with_errors"'.html_safe end end