This project is archived and is in readonly mode.

#1703 ✓resolved
sanderson (at nexttesting)

text_area_tag sanitize_to_id

Reported by sanderson (at nexttesting) | January 6th, 2009 @ 05:45 PM | in 2.x

text_area_tag('item[description]') should set id to "item_description" instead of "item[description]".

The unsanitized id with brackets fails HTML validation.

This is fixed by the attached simple patch file, which sets id to sanitize_to_id(name), instead of just name.

Test included.

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>

Referenced by

Pages