Drop the contents of <script> and <style> tags when we strip them

This commit is contained in:
Tom Hughes 2012-03-16 22:37:15 +00:00
parent 7be823bb11
commit b1cb7bb819
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,4 @@
Sanitize::Config::OSM = Sanitize::Config::RELAXED.dup Sanitize::Config::OSM = Sanitize::Config::RELAXED.dup
Sanitize::Config::OSM[:add_attributes] = { 'a' => { 'rel' => 'nofollow' } } Sanitize::Config::OSM[:add_attributes] = { 'a' => { 'rel' => 'nofollow' } }
Sanitize::Config::OSM[:remove_contents] = [ 'script', 'style' ]

View file

@ -0,0 +1,4 @@
require File.dirname(__FILE__) + '/../test_helper'
class RichTextTest < ActiveSupport::TestCase
end