
    \d                     V   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
  e
 eddd	d          d
          d             Z e
 eddd	d          d
          d             Z e
 eddd	d          d
          d             Z e
 eddd	d          d
          d             ZdS )z I hold HTML generation helpers.
    escape)StringIO)Version)log)
deprecatedTwisted      ztwisted.web.template)replacementc                 ,    dt          |           z   dz   S )z4Wrap <pre> tags around some text and HTML-escape it.z<pre>z</pre>r   )texts    0lib/python3.11/site-packages/twisted/web/html.pyPREr      s     VD\\!H,,    c                     t                      }|                    d           | D ]}|                    d|z             |                    d           |                                S )N<ul>
z<li> %s</li>
</ul>r   writegetvalue)lstioels      r   ULr      sg    	BHHX ( (
!B&''''HHW;;==r   c                     t                      }|                    d           | D ]!\  }}|                    d| d| d           "|                    d           |                                S )Nr   z<li> <a href="z">z
</a></li>
r   r   )r   r   hrr   s       r   linkListr   "   sy    	BHHX 9 9B
7"777778888HHW;;==r   c                     	  | |i |S # t           $ r= t          j        d| d           t          j                     t	          d          cY S w xY w)zoutput(func, *args, **kw) -> html string
    Either return the result of a function (which presumably returns an
    HTML-legal string) or a sparse HTMLized error message and a message
    in the server log.
    zError calling :zAn error occurred.)BaseExceptionr   msgerrr   )funcargskws      r   outputr'   ,   ss    )tT R    ) ) )****+++			'((((()s   
 AAAN)__doc__htmlr   r   r   incrementalr   twisted.pythonr   twisted.python.deprecater   r   r   r   r'    r   r   <module>r.      si                            / / / / / / GGIr1a((6LMMM- - NM-
 GGIr1a((6LMMM  NM GGIr1a((6LMMM  NM GGIr1a((6LMMM) ) NM) ) )r   