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.

text_area_tag should escape contents by default

#2015

text_area_tag currently does not HTML-escape its contents/value by default. However, the rest of the form tag helpers do escape their values, and the corresponding text_area method in FormHelper does it as well.

For consistency and security's sake, it seems like text_area_tag should escape its content by default too.

See also discussion here:

http://groups.google.com/group/r...

and previous ticket here:

http://dev.rubyonrails.org/ticke...

Simple patch attached.

Reported by Chris Mear · February 19th, 2009 @ 02:20 PM

State: committed
Milestone: 2.3.4
Assigned to: Michael Koziarski Michael Koziarski
Importance: none

Activity

  1. Murray Steele
    Murray Steele

    +1

    Looks good to me. Also a pretty sensible addition.

    February 20th, 2009 @ 04:05 PM

  2. Pratik
    Pratik
    • Assigned user set to Michael Koziarski

    Koz is the master of escaping.

    June 21st, 2009 @ 05:20 PM

  3. Bart ten Brinke
  4. Michael Koziarski
    Michael Koziarski
    • Milestone changed from 2.x to 2.3.4

    Looks good, but the patch doesn't apply cleanly now.

    Can you address that (with perhaps a patch each for master and 2-3-stable) and I'll get it in.

    June 26th, 2009 @ 06:07 AM

  5. Michael Koziarski
    Michael Koziarski

    Looks good to me.

    This patch no longer cleanly applies, but if you can address that I'll
    get it in for 2-3 and master.

    June 26th, 2009 @ 06:10 AM

  6. Chris Mear
    Chris Mear

    Here's two new patches, one that applies to the current master branch, and one for the 2-3-stable branch.

    June 26th, 2009 @ 11:51 AM

  7. Repository