This project is archived and is in readonly mode.
form_helper corrupts text_fields which have raw html entities
Reported by Kevin Glowacz | May 1st, 2008 @ 04:53 PM
copied from Trac#8116 :
Given the title "The HTML Entity for & is &", the field to edit it should look something like:
<input id="post_title" name="post[title]" size="30" type="text" value="The HTML Entity for & is &amp;" />
Such strings are correctly escaped in textarea tags, but currently not in text_fields.
I have reformatted this patch by mchenryc
This patch fixes the problem with text fields and adds tests for both text fields and text areas.
Comments and changes to this ticket
-
Kyle Hargraves May 1st, 2008 @ 07:49 PM
+1; I was one of the people who updated this patch while it was still on Trac. It's both tested and introduces extra coverage demonstrating current behaviour.
-
Repository May 1st, 2008 @ 11:56 PM
- State changed from new to resolved
(from [f6ec296ad84ac7e321980cfdd8bba2ea6ce3a14b]) Fixed that TextHelper#text_field would corrypt when raw HTML was used as the value (mchenryc, Kevin Glowacz) [#80 state:resolved]
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>