Skip to content
Snippets Groups Projects
Commit 3a0ea129 authored by pabois's avatar pabois
Browse files

Merge branch 'master' of github.com:noesya/osuny

parents 703d1801 63088f9f
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ class Wordpress
# iframe attributes from MDN : https://developer.mozilla.org/fr/docs/Web/HTML/Element/iframe
fragment = Sanitize.fragment(html, Sanitize::Config.merge(Sanitize::Config::RELAXED,
attributes: Sanitize::Config::RELAXED[:attributes].merge({
all: Sanitize::Config::RELAXED[:attributes][:all].dup.delete('class'),
all: Sanitize::Config::RELAXED[:attributes][:all].dup - ['class', 'style'],
'a' => Sanitize::Config::RELAXED[:attributes]['a'].dup.delete('rel'),
'iframe' => [
'allow', 'allowfullscreen', 'allowpaymentrequest', 'csp', 'height', 'loading',
......@@ -23,7 +23,7 @@ class Wordpress
'frameborder', 'longdesc', 'marginheight', 'marginwidth', 'scrolling'
]
}),
elements: Set.new(Sanitize::Config::RELAXED[:elements]).delete('div') + ['iframe'],
elements: Set.new(Sanitize::Config::RELAXED[:elements]) - ['div', 'style'] + ['iframe'],
whitespace_elements: {
'div' => { :before => "", :after => "" }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment