src/Template/Value.php
public function attrVal($default = null, $escape = true)
    {
        $val = $this->str($default, false);
        return $escape && $this->escaper ? $this->escaper->escapeHtmlAttr($val) : $val;
    }
public function attrVal($default = null, $escape = true)
    {
        $val = $this->str($default, false);
        return $escape && $this->escaper ? $this->escaper->escapeHtmlAttr($val) : $val;
    }
public function attrVal ( $ default = null , $ escape = true ) { $ val = $ this -> str ( $ default , false ) ; return $ escape && $ this -> escaper ? $ this -> escaper -> escapeHtmlAttr ( $ val ) : $ val ; }
Returns val() as an escaped string that can be used inside HTML element attributes.

@param mixed $default
@param bool $escape
@return string
Returns val () as an escaped string that can be used inside HTML element attributes .