Hi -
If I have a forbidden tag, like <a>:
<a>extra stuff</a>
I'd like the whole thing removed. Sanitize just removes the <a> and </
tags. Is there any easy way to remove the whole thing with
sanitize?
Thanks, Dino
Hi -
If I have a forbidden tag, like <a>:
<a>extra stuff</a>
I'd like the whole thing removed. Sanitize just removes the <a> and </
tags. Is there any easy way to remove the whole thing with
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