Changeset 79329 in spip-zone

Timestamp:
Dec 13, 2013, 4:59:32 PM (5 years ago)
Author:
cedric@…
Message:

Jeu de test unitaire pour la fonction spip_htmlentities candidate suivante, à tester en PHP 5.4
<pre>
/

  • htmlentities wrapper (PHP >= 5.4 compat issue) *
  • @param string $string
  • @param int $flags
  • @param string $encoding
  • @param bool $double_encode
  • @return string

*/
function spip_htmlentities($string,$flags=null,$encoding = 'ISO-8859-1',$double_encode = true){

if (is_null($flags)) $flags = ENT_COMPAT|ENT_HTML401;

if (!defined('PHP_VERSION_ID') OR PHP_VERSION_ID < 50203)

return htmlentities($string,$flags,$encoding);

else

return htmlentities($string,$flags,$encoding,$double_encode);

}
</pre>

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.