diff options
| author | Klaas van Schelven <klaas@vanschelven.com> | 2024-11-08 09:55:28 +0100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-11-28 15:53:31 +0100 |
| commit | 1722f2db5808708de6fc6e0f48af2d518be1e348 (patch) | |
| tree | 70166b23c8639886907d251a3575ba78bc9bff9c /django/template | |
| parent | 1636912bf1bacc1da65011c2b26ff48b2c9fad43 (diff) | |
Fixed #35897 -- Removed unnecessary escaping in template's get_exception_info().
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/base.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/django/template/base.py b/django/template/base.py index b974495c9c..eaca428b10 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -57,7 +57,7 @@ from enum import Enum from django.template.context import BaseContext from django.utils.formats import localize -from django.utils.html import conditional_escape, escape +from django.utils.html import conditional_escape from django.utils.regex_helper import _lazy_re_compile from django.utils.safestring import SafeData, SafeString, mark_safe from django.utils.text import get_text_list, smart_split, unescape_string_literal @@ -247,10 +247,10 @@ class Template: for num, next in enumerate(linebreak_iter(self.source)): if start >= upto and end <= next: line = num - before = escape(self.source[upto:start]) - during = escape(self.source[start:end]) - after = escape(self.source[end:next]) - source_lines.append((num, escape(self.source[upto:next]))) + before = self.source[upto:start] + during = self.source[start:end] + after = self.source[end:next] + source_lines.append((num, self.source[upto:next])) upto = next total = len(source_lines) |
