Skip to content

fixed a huge issue with cleaning inner whitelisted tags (which should…#4

Open
jizuscreed wants to merge 1 commit intolincanbin:masterfrom
jizuscreed:new-fix
Open

fixed a huge issue with cleaning inner whitelisted tags (which should…#4
jizuscreed wants to merge 1 commit intolincanbin:masterfrom
jizuscreed:new-fix

Conversation

@jizuscreed
Copy link
Contributor

Hello, there is fix for big issue with deleting whitelisted tags in blacklisted tag. For example:

If we have a code like

<p>
<a>test</a>
</p>

and only tag <a> in white list rules, function clean() will delete all tags (because <a> tag is in <p> tag) and will return only test. It happens because you used $elem->textContent, which returns only text content of element, without tags.

With my fix it wil work correct and function will return <a>test</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant