This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README | Sun Jan 13 23:19:03 -0800 2008 | |
| |
Rakefile | Sun Jan 13 23:19:03 -0800 2008 | |
| |
init.rb | Sun Jan 13 23:19:03 -0800 2008 | |
| |
lib/ | Tue Mar 04 18:10:46 -0800 2008 | |
| |
license.txt | Sun Apr 20 16:53:10 -0700 2008 | |
| |
test/ | Sun Jan 13 23:19:03 -0800 2008 |
README
ValidatesAsSanitizedHtml ============ Written for the Kete software (an open source Rails application for collaborative digital archives) by Walter McGinnis for Katipo Communications, Ltd. (http://katipo.co.nz/). The general idea is to check the quality of user inputed HTML. You may also be interested in the acts_as_sanitized plugin. ==== Requirements: * Rails 2.0.2 or greater * Hpricot gem ==== Usage: In your model: validates_as_sanitized_html :the_user_submitted_html_attribute You can also turn off whether the the attribute will fail validation if there are form, script, or input tags included in the attribute on a record by record basis by adding a do_not_sanitize virtual attribute in your model... attr_accessor :do_not_sanitize Then in your controlle you may set do_not_sanitize to true if, for example, a site admin is allowed to add forms. Cheers, Walter McGinnis







