Source

djmako / djmako / monkeypatches.py

1
2
3
4
5
6
7
8
def patch_safe_data():
    """ Patches Django's ``SafeData`` class so that it will also be considered
        safe by ``markupsafe``. """
    from django.utils.safestring import SafeData
    SafeData.__html__ = lambda self: self

def patch_all():
    patch_safe_data()