Somehow, in a customer’s product theres a dot, . that shows a unknown char square, (i cant copy it to here), but you know those you see when you dont support a language on the web, happens at chinese sites often.
Those squares makes my whole xml file return error:
invalid character in attribute value
How can I, that do not have control to delete this character, to strip/convert this char and continue?
I did:
htmlspecialchars($description, ENT_COMPAT);
(description takes the description=”” attribute, that this character is in.)
htmlspecialchars() helps me with alot of chars. But not this one. How can i do this?
Instead of
htmlspecialchars(), try it withhtmlentities(), which will attempt to encode any entity it can.