(string)
return '"%s"' % html_escape(string).replace('\n','%#10;')\
                    .replace('\r','&#13;').replace('\t','&#9;')
Escape and quote a string to be used as an HTTP attribute.
Escape and quote a string to be used as an HTTP attribute.
Escape and quote a string to be used as an HTTP attribute .
def html_quote(string):
    ''' Escape and quote a string to be used as an HTTP attribute.'''
    return '"%s"' % html_escape(string).replace('\n','%#10;')\
                    .replace('\r','&#13;').replace('\t','&#9;')
def html_quote ( string ) : return '"%s"' % html_escape ( string ) . replace ( '\n' , '%#10;' ) . replace ( '\r' , '&#13;' ) . replace ( '\t' , '&#9;' )