You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a config like this: {elements: ["em"], replaceWithChildrenElements: ["div"]} and the following HTML <div><em>Apple<em></div>, I would expect the result to be <em>Apple</em>.
However, currently sanitize-core first removes all elements not contained in "elements" (Step 2.4.2.) and then handles "replaceWithChildrenElements" (Step 2.4.3.). I propose we swap these two steps.
(We already disallow having the same element in both elements and replaceWithChildrenElements)
The text was updated successfully, but these errors were encountered:
For a config like this:
{elements: ["em"], replaceWithChildrenElements: ["div"]}
and the following HTML<div><em>Apple<em></div>
, I would expect the result to be<em>Apple</em>
.However, currently sanitize-core first removes all elements not contained in
"elements"
(Step 2.4.2.) and then handles"replaceWithChildrenElements"
(Step 2.4.3.). I propose we swap these two steps.(We already disallow having the same element in both elements and replaceWithChildrenElements)
The text was updated successfully, but these errors were encountered: