Acts As HTML Sanitized
Sanitize your database inputs!
Requirements
Ruby and Rails
Acts As HTML Sanitized requires Ruby version >= 1.9.3 and Rails version >= 3.2. That's it.
Installation
Acts As HTML Sanitized is distributed as a gem, which is how it should be used in your app.
gem 'acts_as_html_sanitized'
Quick Start
Models
class User < ActiveRecord::Base
acts_as_html_sanitized
end
This will cause the content of any attribute in the User
model being
stripped of HTML prior to being validated.
Contributing
If you'd like to contribute a feature or bugfix: Thanks! To make sure your fix/feature has a high chance of being included, please read the following guidelines:
- Post a pull request.
- Make sure there are tests! We will not accept any patch that is not tested. It's a rare time when explicit tests aren't needed. If you have questions about writing tests for paperclip, please open a GitHub issue.
Please see CONTRIBUTING.md
for more details on contributing and
running tests.
License
Acts As HTML Sanitized is Copyright © 2014 Sasha Gerrand. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.