@@ 25-41 (lines=17) @@ | ||
22 | * @package Filter |
|
23 | * @subpackage BaseFilter |
|
24 | */ |
|
25 | class HtmlentitiesFilter implements FilterInterface |
|
26 | { |
|
27 | ||
28 | /** |
|
29 | * Ejecuta el filtro |
|
30 | * |
|
31 | * @param string $s |
|
32 | * @param array $options |
|
33 | * @return string |
|
34 | */ |
|
35 | public static function execute($s, $options) |
|
36 | { |
|
37 | $charset = (isset($options['charset'])) ? $options['charset'] : APP_CHARSET; |
|
38 | return htmlentities((string) $s, ENT_QUOTES, $charset); |
|
39 | } |
|
40 | ||
41 | } |
@@ 25-41 (lines=17) @@ | ||
22 | * @package Filter |
|
23 | * @subpackage BaseFilter |
|
24 | */ |
|
25 | class HtmlspecialcharsFilter implements FilterInterface |
|
26 | { |
|
27 | ||
28 | /** |
|
29 | * Ejecuta el filtro |
|
30 | * |
|
31 | * @param string $s |
|
32 | * @param array $options |
|
33 | * @return string |
|
34 | */ |
|
35 | public static function execute($s, $options) |
|
36 | { |
|
37 | $charset = (isset($options['charset'])) ? $options['charset'] : APP_CHARSET; |
|
38 | return htmlspecialchars((string) $s, ENT_QUOTES, $charset); |
|
39 | } |
|
40 | ||
41 | } |