ó
ú2ec           @   s>   d  Z  d d l Z e j r. d d l m Z n e d „ Z d S(   s9   Provide an html.escape method that is python method safe.iÿÿÿÿN(   t   escapec         C   sg   |  j  d d ƒ }  |  j  d d ƒ }  |  j  d d ƒ }  | rc |  j  d d ƒ }  |  j  d	 d
 ƒ }  n  |  S(   s
  
        Replace special characters "&", "<" and ">" to HTML-safe sequences.  If
        the optional flag quote is true (the default), the quotation mark
        characters, both double quote (") and single quote (') characters are
        also translated.
        t   &s   &amp;t   <s   &lt;t   >s   &gt;t   "s   &quot;s   's   &#x27;(   t   replace(   t   st   quote(    (    s9   /usr/local/lib/python2.7/dist-packages/paste/util/html.pyR       s    (   t   __doc__t   sixt   PY3t   htmlR    t   True(    (    (    s9   /usr/local/lib/python2.7/dist-packages/paste/util/html.pyt   <module>   s   	