You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first case is an interesting one, it's not 'html_safe?' because there's the + "\n" in there, another option would be to make String#+ escape it's other operands instead of just marking the result as unsafe... Not sure what the right fix is there, do you have any thoughts?
That second case is expected behaviour, you should be able to use content_tag or tag to build those up and have it work without issue.
yeah, \n isn't 'unsafe' in the sense that it's an attack vector, but with the new xss code everything is considered unsafe unless marked safe. So the options when adding an unsafe string to a safe one are:
new_string = (self + other).unsafe!
new_string = (self + escape(other)).safe!
Currently we do 1, and my gut says that's the right approach, though this single trailing newline version is pretty annoying....
IE
in binarylogic/searchlogic (line 69 of rails_helpers.rb):
and in dpickett/tab_menu (line 15 of view_helpers.rb):
The text was updated successfully, but these errors were encountered: