PEEL Shopping
Open source ecommerce : PEEL Shopping
shared.escape_special_chars.php
Go to the documentation of this file.
1 <?php
9 if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
21  function smarty_function_escape_special_chars($string)
22  {
23  if (!is_array($string)) {
24  $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false);
25  }
26  return $string;
27  }
28 } else {
40  function smarty_function_escape_special_chars($string)
41  {
42  if (!is_array($string)) {
43  $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
44  $string = htmlspecialchars($string);
45  $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
46  }
47  return $string;
48  }
49 }
50 
51 ?>
static $_CHARSET
The character set to adhere to (e.g.

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:16 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.