Drop the contents of <script> and <style> tags when we strip them
This commit is contained in:
parent
7be823bb11
commit
b1cb7bb819
2 changed files with 5 additions and 0 deletions
|
@ -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' ]
|
||||||
|
|
4
test/unit/rich_text_test.rb
Normal file
4
test/unit/rich_text_test.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
|
|
||||||
|
class RichTextTest < ActiveSupport::TestCase
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue