o Úøaäã@sHdZddlmZGdd„dƒZGdd„deeƒZeZdd„Zd d „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@seZdZdd„ZdS)ÚSafeDatacCó|S)zŸ Return the html representation of a string for interoperability. This allows other template engines to understand Django's SafeData. ©©Úselfrrú9/usr/lib/python3/dist-packages/django/utils/safestring.pyÚ__html__ szSafeData.__html__N)Ú__name__Ú __module__Ú __qualname__r rrrr r s rcs(eZdZdZ‡fdd„Zdd„Z‡ZS)Ú SafeStringzb A str subclass that has been specifically marked as "safe" for HTML output purposes. cs"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__Ú isinstancerr)rÚrhsÚt©Ú __class__rr rs  zSafeString.__add__cCr©Nrrrrr Ú__str__$szSafeString.__str__)r r r Ú__doc__rrÚ __classcell__rrrr rs  rcstˆƒ‡‡fdd„ƒ}|S)Ncsˆˆ|i|¤ŽƒSrr)ÚargsÚkwargs©ÚfuncÚ safety_markerrr Úwrapped,sz"_safety_decorator..wrappedr)rrrrrr Ú_safety_decorator+sr cCs(t|dƒr|St|ƒrtt|ƒSt|ƒ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)Úsrrr r#2s  r#N) rÚ functoolsrrÚstrrÚSafeTextr r#rrrr Ús