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 #5

Merged
merged 10 commits into from
Mar 14, 2014

Conversation

damien
Copy link
Contributor

@damien damien commented Mar 14, 2014

Due to a technical limitation, I'm unable to mark strings that call Sanitize::Rails::Engine.clean! as html_safe; there is no clean way to change an instance of String in place into an instance of ActiveSupport::SafeBuffer. That being said, Sanitize::Rails::Engine.clean now marks any text passed through it as html_safe!

Additionally, this branch stubs out a new test suite. For now it just verifies the behavior of Sanitize::Rails::Engine and the Sanitize::Rails::String extension, but I think that's comprehensive enough to give me confidence that the changes presented here won't break anything.

Lastly, I've initialized a TravisCI configuration. Once this is merged in you should see CI builds start to pop up under https://travis-ci.org/vjt/sanitize-rails. And yes, a build status badge has indeed been added to the README. Enjoy!

https://github.com/damien/sanitize-rails/tree/4-mark-cleaned-strings-as-html-safe: Build Status

EDIT: This pull request fixes #4

vjt added a commit that referenced this pull request Mar 14, 2014
Mark cleaned strings as html safe, bootstrap test suite :shipit:
@vjt vjt merged commit 5ba1f92 into vjt:master Mar 14, 2014
@vjt
Copy link
Owner

vjt commented Mar 14, 2014

Man, you're awesome. ❤️ 🍻

@damien damien deleted the 4-mark-cleaned-strings-as-html-safe branch March 14, 2014 02:34
@damien
Copy link
Contributor Author

damien commented Mar 14, 2014

No problemo, thanks for managing the hard work of actually building this gem. Testing it after the fact isn't too tricky, it's just a matter of putting together some sanity checks and adding new ones for the changes I made.

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.

Mark cleaned strings as HTML safe
2 participants