From 20e1890a07a582f24c8f0f8b484b66524057c28e Mon Sep 17 00:00:00 2001 From: "Bjarni R. Einarsson" Date: Sat, 30 May 2015 00:03:39 +0100 Subject: [PATCH] Reduce work done in escapejs somewhat --- mailpile/www/jinjaextensions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailpile/www/jinjaextensions.py b/mailpile/www/jinjaextensions.py index a87520c96..45f86f4a7 100644 --- a/mailpile/www/jinjaextensions.py +++ b/mailpile/www/jinjaextensions.py @@ -618,8 +618,8 @@ def _escapejs(self, value): Lightly inspired from https://github.com/django/django/blame/ebc773ada3e4f40cf5084268387b873d7fe22e8b/django/utils/html.py#L63 """ for bad, good in self._JS_ESCAPES: - value = self._safe(value).replace(bad, good) - return value + value = value.replace(bad, good) + return self._safe(value) @classmethod def _nice_text(self, text):