XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
shared.escape_special_chars.php
Go to the documentation of this file.
1 <?php
20 {
21  if(!is_array($string)) {
22  $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
23  $string = htmlspecialchars($string);
24  $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string);
25  }
26  return $string;
27 }
28 
29 /* vim: set expandtab: */
30 
31 ?>