
    h                     P    d Z ddlmZ  G d d      Z G d dee      ZeZd Zd Zy	)
a8  
Functions for working with "safe strings": strings that can be displayed safely
without further escaping in HTML. Marking something as a "safe string" means
that the producer of the string has already turned characters that should not
be interpreted by the HTML engine (e.g. '<') into the appropriate entities.
    wrapsc                       e Zd Zd Zy)SafeDatac                     | S )z
        Return the html representation of a string for interoperability.

        This allows other template engines to understand Django's SafeData.
         selfs    Z/var/www/html/ranktracker/api/venv/lib/python3.12/site-packages/django/utils/safestring.py__html__zSafeData.__html__   s	         N)__name__
__module____qualname__r   r   r   r   r   r      s    r   r   c                   (     e Zd ZdZ fdZd Z xZS )
SafeStringzb
    A str subclass that has been specifically marked as "safe" for HTML output
    purposes.
    c                 \    t         |   |      }t        |t              rt	        |      S |S )z
        Concatenating a safe string with another safe bytestring or
        safe string is safe. Otherwise, the result is no longer safe.
        )super__add__
isinstancer   r   )r
   rhst	__class__s      r   r   zSafeString.__add__   s,    
 GOC c8$a= r   c                     | S Nr   r	   s    r   __str__zSafeString.__str__$   s    r   )r   r   r   __doc__r   r   __classcell__)r   s   @r   r   r      s    r   r   c                 2     t               fd       }|S )Nc                         | i |      S r   r   )argskwargsfuncsafety_markers     r   wrappedz"_safety_decorator.<locals>.wrapped,   s    T426233r   r   )r$   r#   r%   s   `` r   _safety_decoratorr&   +   s    
4[4 4Nr   c                 j    t        | d      r| S t        |       rt        t        |       S t	        |       S )a  
    Explicitly mark a string as safe for (HTML) output purposes. The returned
    object can be used everywhere a string is appropriate.

    If used on a method as a decorator, mark the returned data as safe.

    Can be called multiple times on a single string.
    r   )hasattrcallabler&   	mark_safer   )ss    r   r*   r*   2   s1     q*{ A..a=r   N)	r   	functoolsr   r   strr   SafeTextr&   r*   r   r   r   <module>r/      s8     h & r   