Skip to content

simple HTML sanitization for Rails, reinventing the wheel perhaps?

License

Notifications You must be signed in to change notification settings

asquared/sanitizes_html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SanitizesHtml
=============

A very simple model-based plugin to remove HTML tags from an attribute.
Requires Hpricot.


Example
=======

class Page < ActiveRecord::Base
  sanitizes_html :body, :allowed_tags => [ 'p', 'b', 'i', 'u', 'img' ], :safe_attributes => { 'img' => [ 'alt', 'src' ] }
end


Copyright (c) 2009 Andrew Armenia, released under the MIT license

About

simple HTML sanitization for Rails, reinventing the wheel perhaps?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages