php-src/ext/standard/tests/strings/htmlentities.phpt

28 lines
636 B
Plaintext
Raw Normal View History

--TEST--
HTML entities
2002-11-03 08:37:59 +00:00
--INI--
output_handler=
2005-08-17 14:01:06 +00:00
unicode.script_encoding=ISO-8859-1
unicode.output_encoding=ISO-8859-1
--FILE--
<?php
2001-02-22 18:35:22 +00:00
setlocale (LC_CTYPE, "C");
2002-03-15 21:03:08 +00:00
$sc_encoded = htmlspecialchars ("<>\"&<26><>\n");
echo $sc_encoded;
$ent_encoded = htmlentities ("<>\"&<26><>\n");
echo $ent_encoded;
echo html_entity_decode($sc_encoded);
echo html_entity_decode($ent_encoded);
?>
--EXPECT--
&lt;&gt;&quot;&amp;<3B><>
&lt;&gt;&quot;&amp;&aring;&Auml;
2002-03-15 21:03:08 +00:00
<>"&<26><>
<>"&<26><>
2006-12-06 13:21:48 +00:00
--UEXPECTF--
Strict Standards: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d
&lt;&gt;&quot;&amp;<3B><>
&lt;&gt;&quot;&amp;&aring;&Auml;
<>"&<26><>
<>"&<26><>