← Back
Editing: safestring.cpython-311.pyc
� �|�e� � �^ � d Z ddlmZ G d� d� � Z G d� dee� � ZeZd� Zd� Zd S ) 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 Zd Zd� ZdS )�SafeDatac � � | S )z� Return the html representation of a string for interoperability. This allows other template engines to understand Django's SafeData. � ��selfs �9/usr/lib/python3/dist-packages/django/utils/safestring.py�__html__zSafeData.__html__ s � � �� N)�__name__� __module__�__qualname__r r r r r r s# � � � � � �� � � � r r c �( � � e Zd ZdZ� fd�Zd� Z� xZS )� SafeStringzb A str subclass that has been specifically marked as "safe" for HTML output purposes. c � �� t � � � |� � }t |t � � rt |� � 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 zSafeString.__add__ s= �� � �G�G�O�O�C� � ���c�8�$�$� !��a�=�=� ��r c � � | S �Nr r s r �__str__zSafeString.__str__$ s � ��r )r r r �__doc__r r � __classcell__)r s @r r r sQ �� � � � � �� �� � � � �� � � � � � r r c �@ � �� t �� � �� fd�� � }|S )Nc �&