lib/string_tools.rb in string_tools-0.11.0 vs lib/string_tools.rb in string_tools-0.11.1

- old
+ new

@@ -135,11 +135,11 @@ # strip_tags_leave_br("<a></a><ul><li>элемент списка</li></ul><p>параграф</p>просто перенос<br>") # # => "<br />элемент списка<br /><br />параграф<br />просто перенос<br>" # # Returns String def strip_tags_leave_br(string) - sanitized = Sanitize.fragment(string, remove_contents: %w(style javascript), elements: %w(p ul li br blockquote)) + sanitized = Sanitize.fragment(string, remove_contents: %w(style script), elements: %w(p ul li br blockquote)) sanitized.gsub!(/<(p|li|blockquote)[^>]*>/, '') sanitized.gsub!(%r{<(br /|ul[^>]*|/[^>]*)>}, '<br />') sanitized.gsub!(/<br \/>(\s|\302\240)+/, '<br />') @@ -180,10 +180,10 @@ Sanitize.fragment( str, :attributes => attributes, :elements => elements, :css => {:properties => Sanitize::Config::RELAXED[:css][:properties]}, - :remove_contents => %w(style javascript), + :remove_contents => %w(style script), :allow_comments => false, :transformers => transformers ) end end