Jump to >

This documentation covers the in-development release of Djblets. You can see the latest stable docs or all previous versions.

djblets.util.html

HTML-related utilities.

mark_safe_lazy(s)[source]

Lazily mark text as safe.

This is useful if you need a lazily-translated string (such as with gettext_lazy()) to be marked safe.

Parameters

text (str) – The text to mark safe.

Returns

A promise representing the safe text.

Return type

django.utils.functional.Promise