PEEL Shopping
Open source ecommerce : PEEL Shopping
modifiercompiler.unescape.php
Go to the documentation of this file.
1 <?php
20 function smarty_modifiercompiler_unescape($params, $compiler)
21 {
22  if (!isset($params[1])) {
23  $params[1] = 'html';
24  }
25  if (!isset($params[2])) {
26  $params[2] = '\'' . addslashes(Smarty::$_CHARSET) . '\'';
27  } else {
28  $params[2] = "'" . $params[2] . "'";
29  }
30 
31  switch (trim($params[1], '"\'')) {
32  case 'entity':
33  case 'htmlall':
34  if (Smarty::$_MBSTRING) {
35  return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')';
36  }
37 
38  return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')';
39 
40  case 'html':
41  return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)';
42 
43  case 'url':
44  return 'rawurldecode(' . $params[0] . ')';
45 
46  default:
47  return $params[0];
48  }
49 }
50 
51 ?>
static $_MBSTRING
Flag denoting if Multibyte String functions are available.
smarty_modifiercompiler_unescape($params, $compiler)
Smarty unescape modifier plugin.
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.