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

Mark cleaned strings as HTML safe #4

Closed
damien opened this issue Mar 13, 2014 · 2 comments · Fixed by #5
Closed

Mark cleaned strings as HTML safe #4

damien opened this issue Mar 13, 2014 · 2 comments · Fixed by #5

Comments

@damien
Copy link
Contributor

damien commented Mar 13, 2014

First off, thanks for putting this gem together @vjt! It saved me a good day of work integrating the sanitize gem into my employer's codebase.

Anyway, back on topic: I'd like to introduce a change to sanitize-rails that would automatically convert all cleaned strings into a SafeBuffer. This would mark any cleaned text/attributes as HTML safe and prevent already cleaned text from being escaped a second time by default when rendering said text in rails views.

Would a pull request I make for this be accepted? I notice there aren't any tests on this gem yet, so I can introduce the beginnings of a test suite with this feature as well.

@vjt
Copy link
Owner

vjt commented Mar 13, 2014

Hey @damien 😄, your proposal makes lots of sense. If you also start laying out the test suite.. I'll be morally obliged to offer you at least two 🍻!

Please go on, I'll gladly review and merge 👍

Thanks!

@damien
Copy link
Contributor Author

damien commented Mar 13, 2014

Will do, I should have some horrible code for you to make fun of by this evening (I'm operating in PDT, GMT -7)

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 a pull request may close this issue.

2 participants