searchlogic
searchlogic copied to clipboard
Rails Helpers in order uses HTML Entities which dont play nice with Rails+XSS
Hey,
Order helper method uses HTML Entities ▲ and ▼ to show the Up and Down arrows. This is then used to create the link's name. However because of rails_xss (which i believe will be default in Rails 3 and can be optionally switched on in 2.3.8 with rails_xss plugin), this gets escaped and I see &$9650; in the output.
searchlogic-2.4.19/lib/searchlogic/rails_helpers.rb" line 47 of 7
I believe we need to do "html_safe" (or "html_safe!" on older versions) to get this to be right.
<< link_to (options[:as]), url_for(url_options), html_options
link_to (options[:as]).html_safe, url_for(url_options), html_options
Or something to that effect.
Cheers, Aditya
I thouht link_to output was marked as html_safe. I have the same problem though.
Solution mentioned works.
Hello, i want remove the arrows from links to apply another images based in class. How i can do that?