Skip to content

Commit 33f060d

Browse files
committed
Add autoescape to Jinja environment
1 parent c54afe3 commit 33f060d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

debug_toolbar/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class DebugToolbarSettings(BaseSettings):
5353
),
5454
)
5555
JINJA_ENV: Environment = Field(
56-
Environment(),
56+
Environment(autoescape=True),
5757
description="The Jinja environment instance used to render the toolbar.",
5858
)
5959
JINJA_LOADERS: list[BaseLoader] = Field(

debug_toolbar/templates/panels/profiling.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<iframe id="profilingContent">
22
<style>.header { display: none; }</style>
3-
{{ content }}
3+
{{ content | safe }}
44
</iframe>
55

66
<script>

0 commit comments

Comments
 (0)