aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-11-10 02:53:43 -0800
committerJosé Valim <jose.valim@gmail.com>2011-11-10 02:53:43 -0800
commitbdd76fb5e397768f9fca78ef6926afcf1ba71365 (patch)
tree470f15aefdfeb42c2dd274f577a522846c5eca57 /actionpack/lib
parent909e5cc32d0bd47dad2f5c5404670a074a9dabbd (diff)
parentb5c3987294d3860a78b1b04ee49b2b55f3cdc614 (diff)
downloadrails-bdd76fb5e397768f9fca78ef6926afcf1ba71365.tar.gz
rails-bdd76fb5e397768f9fca78ef6926afcf1ba71365.tar.bz2
rails-bdd76fb5e397768f9fca78ef6926afcf1ba71365.zip
Merge pull request #3592 from avakhov/av-highlight-regexp
Fix and simplify highlight regexp
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 21074efe86..bc8572fe69 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -120,7 +120,7 @@ module ActionView
text
else
match = Array(phrases).map { |p| Regexp.escape(p) }.join('|')
- text.gsub(/(#{match})(?!(?:[^<]*?)(?:["'])[^<>]*>)/i, options[:highlighter])
+ text.gsub(/(#{match})(?![^<]*?>)/i, options[:highlighter])
end.html_safe
end