Php: why doesn’t undress

Why   not split by strip_tags() ? Besides str_replace() any other features?

+4
source share
4 answers

Well, this is not a tag :)

Also, yes, html_entity_decode is the way to go.

+8
source

Unlike HTML tags, objects (such as < or   ) represent valid characters.
If you remove all objects from the HTML fragment, you will close all < characters, as well as any other characters that were included as objects.

You need to decode the objects into the characters that they represent using the html_entity_decode function.

+4
source

It is not without, because, according to the documentation , it removes only tags. &nbsp; is not a tag, it is an entity symbol code. You can use html_entity_decode

0
source

strip_tags () does not delete html objects

Not sure what you are trying to achieve, but will html_entity_decode () work for you? It will turn and nbsp; into inextricable space.

0
source

All Articles