Skip to content

Commit af27290

Browse files
authored
Revert "For jinja autoescape, mark HTML strings as safe, not needing escaping"
This reverts commit 77bff0c.
1 parent bd7186c commit af27290

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

mkdocs_git_revision_date_localized_plugin/util.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import os
44
import time
55

6-
from markupsafe import Markup
7-
86
from mkdocs_git_revision_date_localized_plugin.ci import raise_ci_warnings
97
from mkdocs_git_revision_date_localized_plugin.dates import get_date_formats
108

@@ -87,7 +85,7 @@ def get_git_commit_timestamp(
8785
commit_timestamp = git.log(
8886
realpath, date="unix", format="%at", diff_filter="A", no_show_signature=True, follow=True
8987
)
90-
# A file can be created multiple times, through a file renamed.
88+
# A file can be created multiple times, through a file renamed.
9189
# Commits are ordered with most recent commit first
9290
# Get the oldest commit only
9391
if commit_timestamp != "":
@@ -167,7 +165,7 @@ def get_date_formats_for_timestamp(
167165
dict: Localized date variants.
168166
"""
169167
date_formats = get_date_formats(
170-
unix_timestamp=commit_timestamp,
168+
unix_timestamp=commit_timestamp,
171169
time_zone=self.config.get("timezone"),
172170
locale=locale,
173171
custom_format=self.config.get('custom_format')
@@ -185,7 +183,7 @@ def add_spans(date_formats: Dict[str, str]) -> Dict[str, str]:
185183
"""
186184
for date_type, date_string in date_formats.items():
187185
date_formats[date_type] = (
188-
Markup('<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-%s">%s</span>')
186+
'<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-%s">%s</span>'
189187
% (date_type, date_string)
190188
)
191189
return date_formats

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
mkdocs>=1.0
22
GitPython
33
babel>=2.7.0
4-
pytz
5-
markupsafe
4+
pytz

0 commit comments

Comments
 (0)