B
bN @ s d dl Z d dlZd dlZd dlZdddddgZdZdddZed Zej fd
dZ
dddZd
d Zdd Z
edZedZdd ZejZejZedkrd dlZe dS ) N
html_quotehtml_unquote url_quoteurl_unquote
strip_htmlzUTF-8c C s` |pt }| dkrdS t| tr*t| dS t| trFt| |dS tt| |dS dS )z
Quote the value (turned to a string) as HTML. This quotes <, >,
and quotes:
>>> html_quote(1)
'1'
>>> html_quote(None)
''
>>> html_quote('<hey!>')
'<hey!>'
>>> html_quote(u'\u1029')
'\xe1\x80\xa9'
N )default_encoding
isinstancestrcgiescapeunicodeencode)vencoding r C/opt/alt/python37/lib/python3.7/site-packages/paste/util/quoting.pyr s
z
&([a-zA-Z]+);c C s* | | d}|rt|S | dS d S )Nr r )getgroupunichr)matchZname2ccoder r r _entity_subber'