Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
/**
3
 * Smarty shared plugin
4
 *
5
 * @package    Smarty
6
 * @subpackage PluginsShared
7
 */
8
/**
9
 * escape_special_chars common function
10
 * Function: smarty_function_escape_special_chars
11
 * Purpose:  used by other smarty functions to escape
12
 *           special chars except for already escaped ones
13
 *
14
 * @author Monte Ohrt <monte at ohrt dot com>
15
 *
16
 * @param string $string text that should by escaped
17
 *
18
 * @return string
19
 */
20
function smarty_function_escape_special_chars($string)
21
{
22
    if (!is_array($string)) {
991 lars 23
        $string = htmlspecialchars((string) $string, ENT_COMPAT, Smarty::$_CHARSET, false);
148 lars 24
    }
25
    return $string;
26
}