Skip to content

Commit

Permalink
feature: add media to sanitize rules
Browse files Browse the repository at this point in the history
  • Loading branch information
GIGrave committed Nov 29, 2023
1 parent 06eb51e commit 393bb13
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/string_tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ def sanitize(str, attrs = {})
str,
:attributes => attributes,
:elements => elements,
:css => {:properties => Sanitize::Config::RELAXED[:css][:properties], protocols: protocols},
:css => {
at_rules_with_styles: ['media'],
properties: Sanitize::Config::RELAXED[:css][:properties],
protocols: protocols,
},
:remove_contents => remove_contents || Set['style', 'script'],
:allow_comments => false,
:transformers => transformers
Expand Down

0 comments on commit 393bb13

Please sign in to comment.