o
    ß­j  ã                   @  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.
    ÚaÚ_blankÚnoopener)ÚtargetÚrelÚhref)ÚattribÚlinkÚunicodeÚhtml)ÚencodingÚmethod)r   ÚElementr   r   Útostring)r   r   Útag© r   úd/var/www/html/CropPilot/venv/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   Ú	xml.etreer   Úgoogle.generativeai.notebookr   r   r   r   r   r   Ú<module>   s
   