functions-online

htmlentities

en
de
es
fr
pt

description

This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.

Die Funktion ist komplett identisch zu htmlspecialchars(), allerdings wandelt htmlentities() wirklich alle Zeichen, die eine HTML-Code-Entsprechung haben, in diese Entsprechung um.

Esta función es identica en todo a htmlspecialchars(), excepto que con htmlentities(), todos los caracteres que tengan una entidad equivalente en HTML serán cambiados a esas entidades.

htmlentities() est identique à la fonction htmlspecialchars(), sauf que tous les caractères qui ont des équivalents en entités HTML sont effectivement traduits.

Esta função é idêntica a htmlspecialchars() em toda forma, exceto que com htmlentities(), todos caracteres que tem entidade HTML equivalente são convertidos para estas entidades.

function call

string htmlentities( string $str [, int $quote_style ] [, string $charset ] )

test htmlentities online










comments for htmlentities

On 12. Feb 2010 16:18 basnik wrote:

This page is great, but there's one big problem for me. Page encoding is set to ISO-8859-15, so if I want to try something with different charset (mainly UTF-8), I get question marks instead of my input.

On 01. Dec 2009 14:30 butzi wrote:

@rolf: it is not as easy as it looks like. The content should not be changed through this replacement, stripslashes will also remove slashes, that are provided through the input eg. escaped double quotations ... thats why it takes some time :-)

On 01. Dec 2009 11:29 rolf wrote:

Just a call to stripslashes on the output, and it should be OK ;)

On 25. Nov 2009 12:53 butzi wrote:

@J yes, you are right, they do not have the backslash. I try to fix it in the next days. Thanks!

On 24. Nov 2009 17:12 J wrote:

Like the page a lot, but words with apostrophes shouldn't have a backslash in the result, should they? Result: "words with apostrophes shouldn\'t be output with a backslash, should they?"

+

Leave your comment