How to use the markupsafe.EscapeFormatter function in MarkupSafe

To help you get started, we’ve selected a few MarkupSafe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pypa / pipenv / pipenv / vendor / jinja2 / sandbox.py View on Github external
first, rest = formatter_field_name_split(field_name)
        obj = self.get_value(first, args, kwargs)
        for is_attr, i in rest:
            if is_attr:
                obj = self._env.getattr(obj, i)
            else:
                obj = self._env.getitem(obj, i)
        return obj, first

class SandboxedFormatter(SandboxedFormatterMixin, Formatter):

    def __init__(self, env):
        SandboxedFormatterMixin.__init__(self, env)
        Formatter.__init__(self)

class SandboxedEscapeFormatter(SandboxedFormatterMixin, EscapeFormatter):

    def __init__(self, env, escape):
        SandboxedFormatterMixin.__init__(self, env)
        EscapeFormatter.__init__(self, escape)
github wwqgtxx / wwqLyParse / wwqLyParse / lib / flask_lib / jinja2 / sandbox.py View on Github external
first, rest = formatter_field_name_split(field_name)
        obj = self.get_value(first, args, kwargs)
        for is_attr, i in rest:
            if is_attr:
                obj = self._env.getattr(obj, i)
            else:
                obj = self._env.getitem(obj, i)
        return obj, first

class SandboxedFormatter(SandboxedFormatterMixin, Formatter):

    def __init__(self, env):
        SandboxedFormatterMixin.__init__(self, env)
        Formatter.__init__(self)

class SandboxedEscapeFormatter(SandboxedFormatterMixin, EscapeFormatter):

    def __init__(self, env, escape):
        SandboxedFormatterMixin.__init__(self, env)
        EscapeFormatter.__init__(self, escape)
github Jenyay / outwiker / plugins / snippets / snippets / libs / jinja2 / sandbox.py View on Github external
first, rest = formatter_field_name_split(field_name)
        obj = self.get_value(first, args, kwargs)
        for is_attr, i in rest:
            if is_attr:
                obj = self._env.getattr(obj, i)
            else:
                obj = self._env.getitem(obj, i)
        return obj, first

class SandboxedFormatter(SandboxedFormatterMixin, Formatter):

    def __init__(self, env):
        SandboxedFormatterMixin.__init__(self, env)
        Formatter.__init__(self)

class SandboxedEscapeFormatter(SandboxedFormatterMixin, EscapeFormatter):

    def __init__(self, env, escape):
        SandboxedFormatterMixin.__init__(self, env)
        EscapeFormatter.__init__(self, escape)
github pallets / jinja / jinja2 / sandbox.py View on Github external
first, rest = formatter_field_name_split(field_name)
        obj = self.get_value(first, args, kwargs)
        for is_attr, i in rest:
            if is_attr:
                obj = self._env.getattr(obj, i)
            else:
                obj = self._env.getitem(obj, i)
        return obj, first

class SandboxedFormatter(SandboxedFormatterMixin, Formatter):

    def __init__(self, env):
        SandboxedFormatterMixin.__init__(self, env)
        Formatter.__init__(self)

class SandboxedEscapeFormatter(SandboxedFormatterMixin, EscapeFormatter):

    def __init__(self, env, escape):
        SandboxedFormatterMixin.__init__(self, env)
        EscapeFormatter.__init__(self, escape)
github catboost / catboost / contrib / python / Jinja2 / jinja2 / sandbox.py View on Github external
first, rest = formatter_field_name_split(field_name)
        obj = self.get_value(first, args, kwargs)
        for is_attr, i in rest:
            if is_attr:
                obj = self._env.getattr(obj, i)
            else:
                obj = self._env.getitem(obj, i)
        return obj, first

class SandboxedFormatter(SandboxedFormatterMixin, Formatter):

    def __init__(self, env):
        SandboxedFormatterMixin.__init__(self, env)
        Formatter.__init__(self)

class SandboxedEscapeFormatter(SandboxedFormatterMixin, EscapeFormatter):

    def __init__(self, env, escape):
        SandboxedFormatterMixin.__init__(self, env)
        EscapeFormatter.__init__(self, escape)
github cylc / cylc-flow / lib / jinja2 / sandbox.py View on Github external
first, rest = formatter_field_name_split(field_name)
        obj = self.get_value(first, args, kwargs)
        for is_attr, i in rest:
            if is_attr:
                obj = self._env.getattr(obj, i)
            else:
                obj = self._env.getitem(obj, i)
        return obj, first

class SandboxedFormatter(SandboxedFormatterMixin, Formatter):

    def __init__(self, env):
        SandboxedFormatterMixin.__init__(self, env)
        Formatter.__init__(self)

class SandboxedEscapeFormatter(SandboxedFormatterMixin, EscapeFormatter):

    def __init__(self, env, escape):
        SandboxedFormatterMixin.__init__(self, env)
        EscapeFormatter.__init__(self, escape)
github wwqgtxx / wwqLyParse / wwqLyParse / lib / flask_lib / jinja2 / sandbox.py View on Github external
def __init__(self, env, escape):
        SandboxedFormatterMixin.__init__(self, env)
        EscapeFormatter.__init__(self, escape)