namor / aqueduct

HTML, CSS and Embed sandboxing and sanitizer (Rails Plugin)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

= Aqueduct

+Aqueduct+ performs sandboxing on HTML, CSS and Embeds. 

To install, do:

script/plugin install git@github.com:namor/aqueduct.git

== HTML sandboxing

* Append something in front of id's
* Rails sanitization: Removes bad HTML with Rails's built-in sanitize method. Bad tags are removed completely, including their content.

== Usage

 class Comment < ActiveRecord::Base
   html_sanitizer :field_name, :append => "sandbox"   #=> id's will be appended with sandbox_
 end



== CSS sandboxing
== Usage

 class Comment < ActiveRecord::Base
   css_sanitizer :field_name, :append => "network_"  #=> CSS selectors will be appended with #network_
 end


== Unique features

* Rails 2.1-ready.
* It works with migrations. Columns are fetched when model is saved, not when the class is loaded.

== TODO
* Option to prevent XML namespaced tags from being stripped
* Dynamic :append option

== Credits

== License

MIT License, just like Rails

About

HTML, CSS and Embed sandboxing and sanitizer (Rails Plugin)

License:MIT License


Languages

Language:Ruby 100.0%