Sanitize doesn't remove inner html

Hi -

If I have a forbidden tag, like :

extra stuff

I’d like the whole thing removed. Sanitize just removes the and </
a> tags. Is there any easy way to remove the whole thing with
sanitize?

Thanks,
Dino

On Mon, Aug 18, 2008 at 9:29 PM, dino d. [email protected] wrote:

sanitize?

Thanks,
Dino

The sanitizer is only going to remove the content of the tag if it’s
considered a “bad” tag (like ). You can add tot he list of bad
tags
by throwing this at the bottom of environment.rb

Rails::Initializer.run do |config|
config.action_view.sanitized_bad_tags = %w(a strong table)
end

Brandon

Sessions by Collective Idea: Ruby on Rails training in a vacation
setting
http://sessions.collectiveidea.com