Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make HTML escaping work as expected. Note: Don't get why the outer ht…
…ml_safe-call isn't enough. =S
- Loading branch information
fb02665
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because content_tag will escape any content string unless it is already marked html_safe. It uses the overridden ERB::Util.html_escape method which now checks for the html_safe flag first before escaping.
fb02665
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!! I was trying to fix that myself but couldn't find the source of the problem...
fb02665
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adzap: OK, I didn't know that. Thanks for the expanation!
@vinibaggio: I was actually wondering if I was the only one. :)
fb02665
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grimen: Thanks a lot!! :)