Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple_format - Prevent too much escaped html #1421

Merged
merged 2 commits into from Sep 27, 2013
Merged

simple_format - Prevent too much escaped html #1421

merged 2 commits into from Sep 27, 2013

Conversation

inkstak
Copy link
Contributor

@inkstak inkstak commented Sep 26, 2013

Hi,

simple_format always escape html, but in some case this is too much.

Let us the choice about escaping or not !

@ujifgc
Copy link
Member

ujifgc commented Sep 26, 2013

I don't like it. I think it should be something like text = escape_html(text.to_s.dup) unless text.html_safe? and no flag.

@ujifgc
Copy link
Member

ujifgc commented Sep 26, 2013

BTW, @inkstak thanks for bringing this to attention. The method is clearly not respecting SafeBuffer rules.

@inkstak
Copy link
Contributor Author

inkstak commented Sep 27, 2013

Looks better ?

@ujifgc
Copy link
Member

ujifgc commented Sep 27, 2013

Yep, looks good. Thanks.

ujifgc added a commit that referenced this pull request Sep 27, 2013
simple_format - Prevent too much escaped html
@ujifgc ujifgc merged commit 218b379 into padrino:master Sep 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants