+
    	:i  c                   sV    . ROt ^ RIt^ RIt^ RIHt  ! R R]4      tR tR tR	R ltR# )
escape_htmlN)
HTMLParserc                   s,   a  ] tR t^!t o R tR tRtV tR# )
HTMLFilterc                s@    \         P                  ! V 4       R V n        R# )Z N)r   __init__text)self   &=/usr/lib/python3.14/site-packages/setroubleshoot/html_util.pyr   ZHTMLFilter.__init__"   s    D!	    c                s8    V ;P                   V,          un         R # )Nr   )r   Zdatas   &&r   handle_dataZHTMLFilter.handle_data&   s    		T	r   r	   N)Z__name__Z
__module__Z__qualname__Z__firstlineno__r   r
   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r   !   s      r   r   c                 s    V f   R # V P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  R	R
4      p V # )N&&amp;<&lt;>&gt;'&apos;"&quot;ZreplaceZsr   r   r    r    +   s_    y			#wA			#vA			#vA			#x A			#x AHr   c                 s    V f   R # RV 9  d   V # V P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  RR	4      p V P                  R
R4      p V # )Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   unescape_htmlr   6   sk    y
!|			&#A			&#A			(C A			(C A			'3AHr   c                 s    \        4       pVP                  V 4       \        P                  ! VP                  VR 7      #   \
         d8   p\        P                  ! \        P                  RT,          4        Rp?R# Rp?ii ; i))Zwidthzcannot convert html to text: %sN)r   ZfeedtextwrapZfillr   Z	ExceptionsyslogZLOG_ERR)ZhtmlZmaxcolZhfilterZes   &&  r   html_to_textr   C   sZ    ,T}}W\\88 fnn&G!&KLs   <? B
,A<<B)r    r   r   )iP   )	Z__all__r   r   Zhtml.parserr   r   r    r   r   ) r   r   <module>r      s2   *   " 
r   