This project is archived and is in readonly mode.

#1302 ✓resolved
Dan Weinand

Using the highlight helper on text with html shouldn't highlight text inside html attributes

Reported by Dan Weinand | October 30th, 2008 @ 06:11 PM

This patch prevents the highlight text helper from highlighting text within html attributes.

ex without patch:



highlight('Rails was featured in a new <a href="http://example.com/blog/rails">blog post</a> today.', "rails")

#=> '<strong class="highlight">Rails</strong> was featured in a new <a href="http://example.com/blog/<strong class="highlight">rails</strong>">blog post</a> today.'

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages