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.

Helpers use safe_concat rather than marking strings as html_safe

#4670

The #concat and #cache helpers in Rails 2.3.6 call output_buffer#safe_concat rather than calling output_buffer#concat and passing in an html_safe string. This is a major compatibility issue for alternate templating engines: Haml, for instance, uses a plain String as output_buffer, and handles XSS-escaping elsewhere. Rails should never assume that output_buffer is a SafeBuffer.

This patch on my Rails fork fixes the issue.

Reported by nex3 · May 23rd, 2010 @ 12:17 PM

State: invalid
Milestone: 2.3.6
Assigned to: nobody
Importance: none

Activity

  1. Santiago Pastorino
    Santiago Pastorino
    • Milestone set to 2.3.6
    • State changed from new to open

    I think a lot of fixes from master weren't backported

    May 23rd, 2010 @ 05:11 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to invalid

    output_buffer is always a SafeBuffer, the rest of the template engines should use this if not this templates aren't safe.
    I'm opening a new ticket with a fragment_for backport.

    May 23rd, 2010 @ 05:32 PM

  3. bingbing
  4. bingbing