private static function encodeHtmlAttributeString($value) {
        if ($value === null) {
            return '';
        }

        $result = $value;

        $result = str_replace('&', '&amp;', $result);
        $result = str_replace('<', '&lt;', $result);
        $result = str_replace('"', '&quot;', $result);
        $result = str_replace('\'', '&#39;', $result);

        return $result;
    }
private static function encodeHtmlAttributeString($value) {
        if ($value === null) {
            return '';
        }

        $result = $value;

        $result = str_replace('&', '&amp;', $result);
        $result = str_replace('<', '&lt;', $result);
        $result = str_replace('"', '&quot;', $result);
        $result = str_replace('\'', '&#39;', $result);

        return $result;
    }
private static function encodeHtmlAttributeString ( $ value ) { if ( $ value === null ) { return '' ; } $ result = $ value ; $ result = str_replace ( '&' , '&amp;' , $ result ) ; $ result = str_replace ( '<' , '&lt;' , $ result ) ; $ result = str_replace ( '"' , '&quot;' , $ result ) ; $ result = str_replace ( '\'' , '&#39;' , $ result ) ; return $ result ; }
Escapes special characters in the specified value for its use as the value of an HTML-attribute.

@param string $value String to encode.

@return string
Escapes special characters in the specified value for its use as the value of an HTML - attribute .