php-src/ext/standard/tests/strings/htmlentities.phpt
2005-08-17 14:01:06 +00:00

22 lines
446 B
PHP

--TEST--
HTML entities
--INI--
output_handler=
unicode.script_encoding=ISO-8859-1
unicode.output_encoding=ISO-8859-1
--FILE--
<?php
setlocale (LC_CTYPE, "C");
$sc_encoded = htmlspecialchars ("<>\"&åÄ\n");
echo $sc_encoded;
$ent_encoded = htmlentities ("<>\"&åÄ\n");
echo $ent_encoded;
echo html_entity_decode($sc_encoded);
echo html_entity_decode($ent_encoded);
?>
--EXPECT--
&lt;&gt;&quot;&amp;åÄ
&lt;&gt;&quot;&amp;&aring;&Auml;
<>"&åÄ
<>"&åÄ