This project is archived and is in readonly mode.
[patch] image_tag doesn't allow :escape => false option anymore
Reported by tsailipu | July 6th, 2009 @ 10:32 PM | in 3.x
image_tag used to allow the caller to specify :escape => false option to avoid escaping its attribute values. The current implementation simply invokes tag() without honoring the :escape option anymore.
Comments and changes to this ticket
-
mdeering September 24th, 2009 @ 05:44 AM
- Tag set to actionview, bugmash, image_tag
I just ran into this. This seems pretty clear cut to fix.
tag parameters
tag(name, options = nil, open = false, escape = true)
But when called from image_tag is just called like so
tag("img", options)
Should be able to change the call inside of image_tag over to?
tag("img", options, false, options.delete(:escape))
I have never contributed to Rails so give me some time to poke around find the procedures.
-
mdeering September 24th, 2009 @ 07:13 AM
Attaching the patch to fix/allow the escape option to work with image_tag
-
mdeering September 24th, 2009 @ 07:36 AM
- Tag changed from actionview, bugmash, image_tag to actionview, bugmash, image_tag, patch
Adding the patch tag as per the contributers guide.
-
mdeering September 25th, 2009 @ 06:23 AM
Patch was against Edge Rails. I will do one up quickly for 2-3-stable if that is what is needed.
-
Elad Meidar September 25th, 2009 @ 06:36 AM
i am pretty sure you need to patch both... but there you have it anyway..
-
Matías Flores September 27th, 2009 @ 07:57 PM
verified the wrong behavior in both master and 2-3-stable
+1 both patches applies cleanly and fix the issue -
mdeering October 1st, 2009 @ 05:30 AM
- Title changed from image_tag doesn't allow :escape => false option anymore to [patch] image_tag doesn't allow :escape => false option anymore
Adding patch to the title. Really not sure what else is needed to get movement or feedback. Tried to posting to IRC a few times with no luck.
-
Rizwan Reza February 12th, 2010 @ 12:46 PM
- Tag changed from actionview, bugmash, image_tag, patch to actionview, image_tag, patch
-
Rizwan Reza May 16th, 2010 @ 03:54 AM
- Tag changed from actionview, image_tag, patch to actionview, bugmash, image_tag, patch
- State changed from new to open
Do we still need this?
-
Neeraj Singh May 16th, 2010 @ 04:20 AM
This is not an issue with rails3.
Just specify :alt => nil and image tag will not have 'alt' attribute.
-
Rizwan Reza May 16th, 2010 @ 04:12 PM
- Tag changed from actionview, bugmash, image_tag, patch to actionview, image_tag, patch
- State changed from open to resolved
-
tsailipu May 16th, 2010 @ 06:25 PM
HI, Neeraj and Rizwan, how is this Neeraj's response related to the :escape => false option that this bug is about?
-
tsailipu May 16th, 2010 @ 06:30 PM
- Assigned user set to Rizwan Reza
-
Neeraj Singh May 16th, 2010 @ 08:03 PM
@tsailipu I misread the question. The question was about escaping of attributes and I got it wrong. Sorry about that.
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>