Browse files

ubiquo_field_error_proc: fix html_tag regexp [#739 state:resolved]

  • Loading branch information...
1 parent 95bc06a commit 8f803cd569744fec691dc18f2ba2b13ac772810d @tokland tokland committed with bfcapell Mar 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ubiquo_core/lib/ubiquo/extensions/action_view.rb
View
2 ubiquo_core/lib/ubiquo/extensions/action_view.rb
@@ -7,7 +7,7 @@ def self.ubiquo_field_error_proc
msg = instance.error_message
error_class = Ubiquo::Settings.get(:error_field_class)
unless (html_tag =~ /<input.*?type=\"(checkbox|radio|file)\"/)
- if html_tag =~ /<(input|textarea|select)[^>]+class=/
+ if html_tag =~ /<(input|textarea|select)[^>]+class=['"]/
class_attribute = html_tag =~ /class=['"]/
html_tag.insert(class_attribute + 7, "#{error_class} ")
elsif html_tag =~ /<(input|textarea|select)/

0 comments on commit 8f803cd

Please sign in to comment.