Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#1302

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.'

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

State: resolved
Milestone: none
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Tom Brice
    Tom Brice

    This allows the use of #highlight on arbitrary HTML without breaking it

    October 30th, 2008 @ 07:28 PM

  2. Pratik
    Pratik
    • Milestone cleared.
    • Assigned user set to Pratik
    • Title changed from [PATCH] Using the highlight helper on text with html shouldn't highlight text inside html attributes to Using the highlight helper on text with html shouldn't highlight text inside html attributes

    January 19th, 2009 @ 08:10 PM

  3. Repository
    Repository
    • State changed from new to resolved

    (from [91eeb0ff119d34d0fcdb44d3d7fcbb7924208e05]) Using the highlight helper on text with html shouldn't highlight text inside html attributes. [#1302 Using the highlight helper on text with html shouldn't highlight text inside ... state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    January 28th, 2009 @ 08:01 PM