o
    Zh                     @  s6   d Z ddlmZ ddlmZ ddlmZ dd
dZdS )zUtilities for generating HTML.    )annotations)ElementTree)	sheets_idurlsheets_id.SheetsURLtextstrreturnc                 C  s8   t jdddt| dd}|r|nd|_t j|ddd	S )
a  Returns a HTML string representing an anchor tag.

    This class uses the xml.etree library to handle HTML escaping.

    Args:
      url: The Sheets URL to link to.
      text: The text body of the link.

    Returns:
      A string representing a HTML fragment.
    aZ_blankZnoopener)targetrelhref)attriblinkunicodehtml)encodingmethod)r   ZElementr   r   Ztostring)r   r   tag r   ^/var/www/html/lang_env/lib/python3.10/site-packages/google/generativeai/notebook/html_utils.pyget_anchor_tag   s   r   N)r   r   r   r   r	   r   )__doc__
__future__r   Z	xml.etreer   Zgoogle.generativeai.notebookr   r   r   r   r   r   <module>   s
   