diff options
Diffstat (limited to 'grc/core/blocks/_templates.py')
-rw-r--r-- | grc/core/blocks/_templates.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/grc/core/blocks/_templates.py b/grc/core/blocks/_templates.py index 37775cea1d..8ed69c6eac 100644 --- a/grc/core/blocks/_templates.py +++ b/grc/core/blocks/_templates.py @@ -16,12 +16,15 @@ from ..errors import TemplateError # The utils dict contains convenience functions # that can be called from any template + + def no_quotes(string, fallback=None): if len(string) > 2: if str(string)[0] + str(string)[-1] in ("''", '""'): return str(string)[1:-1] return str(fallback if fallback else string) + utils = {'no_quotes': no_quotes} |