Skip to content
Advertisement

Tag: html-entities

PHP htmlentities not working even with parameters

Of course this has been asked before and have searched for solutions, all which have not worked thus far. I want to change out the TM symbol and the ampersand to their html equivelents by using htmlentities or htmlspecialchars: This displays: I have also tried it with htmlspecialchars and the second parameter changed with the same result. What am I

HTMLENTITIES doesn’t work with cyrillics

How can I make htmlentities to work with cyrillic symbols. Now, when I try input some cyrillic: “Тест” it returns “Теє My code: $var = htmlentities($var); Encoding: utf-8. Thanks! Answer In order to bring closure to this question – I want my users not to enter HTML code in their comments This is not necessary; htmlspecialchars() will convert all special

PHP XSS sanitization

Questions: What are the best safe1(), safe2(), safe3(), and safe4() functions to avoid XSS for UTF8 encoded pages? Is it also safe in all browsers (specifically IE6)? . Many people say the absolute best that can be done is: . . There are a hell of a lot of posts about PHP and XSS. Most just say “use HTMLPurifier” or

Advertisement