This project is archived and is in readonly mode.
Field_set_tag doesn't escape the legend
Reported by Bruno Michel | November 1st, 2009 @ 02:29 PM | in 2.3.6
The field_set_tag doesn't escape the legend, but returns an html-safe string. I've patched it to escape it.
Comments and changes to this ticket
-
Michael Koziarski November 30th, 2009 @ 08:34 PM
- Tag changed from 2-3-stable, patch, xss to patch, xss
- Milestone cleared.
Can't apply this to 2-3-stable as it'll break people's apps who have already added h() calls, we can fix it in master though where h() is idempotent.
-
Santiago Pastorino March 8th, 2010 @ 03:41 AM
- State changed from new to wontfix
On 3.0 is working that way.
It's automatically escaped because you start with a SafeBuffer and the output builder concat that legend with the SafeBuffer he manages using this method from SafeBuffermodule ActiveSupport #:nodoc: class SafeBuffer < String def concat(value) if value.html_safe? super(value) else super(ERB::Util.h(value)) end end alias << concat end end
-
Santiago Pastorino March 10th, 2010 @ 12:12 AM
- State changed from wontfix to open
- Milestone set to 2.3.6
That's fixed with http://github.com/spastorino/rails/commit/84fd5400c065b6ca659a50354...
-
Santiago Pastorino March 22nd, 2010 @ 02:50 AM
- State changed from open to wontfix
This is going to be fixed on github.com/rails/rails_xss
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>
People watching this ticket
Attachments
Referenced by
- 3785 Content_tag_string Sanitizes Possibly Unsafe HTML This ticket is related to the ongoing work on HTML safe s...
- 3883 Content_tag does not escape its input! In the first case, it will also fix 2 others of my ticket...