Python django.utils.safestring.mark_for_escaping() Examples

The following are 5 code examples of django.utils.safestring.mark_for_escaping(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module django.utils.safestring , or try the search function .
Example #1
Source File: defaultfilters.py    From GTDWeb with GNU General Public License v2.0 5 votes vote down vote up
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    return mark_for_escaping(value) 
Example #2
Source File: defaultfilters.py    From python with Apache License 2.0 5 votes vote down vote up
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    with warnings.catch_warnings():
        # Ignore mark_for_escaping deprecation -- this will use
        # conditional_escape() in Django 2.0.
        warnings.simplefilter('ignore', category=RemovedInDjango20Warning)
        return mark_for_escaping(value) 
Example #3
Source File: defaultfilters.py    From luscan-devel with GNU General Public License v2.0 5 votes vote down vote up
def escape_filter(value):
    """
    Marks the value as a string that should not be auto-escaped.
    """
    return mark_for_escaping(value) 
Example #4
Source File: defaultfilters.py    From openhgsenti with Apache License 2.0 5 votes vote down vote up
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    return mark_for_escaping(value) 
Example #5
Source File: defaultfilters.py    From python2017 with MIT License 5 votes vote down vote up
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    with warnings.catch_warnings():
        # Ignore mark_for_escaping deprecation -- this will use
        # conditional_escape() in Django 2.0.
        warnings.simplefilter('ignore', category=RemovedInDjango20Warning)
        return mark_for_escaping(value)