CI_Security::_filter_attributes PHP Method

_filter_attributes() protected method

Filters tag attributes for consistency and safety.
protected _filter_attributes ( string $str ) : string
$str string
return string
    protected function _filter_attributes($str)
    {
        $out = '';
        if (preg_match_all('#\\s*[a-z\\-]+\\s*=\\s*(\\042|\\047)([^\\1]*?)\\1#is', $str, $matches)) {
            foreach ($matches[0] as $match) {
                $out .= preg_replace('#/\\*.*?\\*/#s', '', $match);
            }
        }
        return $out;
    }