Code Duplication    Length = 17-17 lines in 2 locations

core/libs/filter/base_filter/htmlentities_filter.php 1 location

@@ 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
}

core/libs/filter/base_filter/htmlspecialchars_filter.php 1 location

@@ 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
}