Skip to content

Commit

Permalink
Revert "For jinja autoescape, mark HTML strings as safe, not needing …
Browse files Browse the repository at this point in the history
…escaping"

This reverts commit 77bff0c.
  • Loading branch information
timvink authored Feb 3, 2024
1 parent bd7186c commit af27290
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 3 additions & 5 deletions mkdocs_git_revision_date_localized_plugin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import os
import time

from markupsafe import Markup

from mkdocs_git_revision_date_localized_plugin.ci import raise_ci_warnings
from mkdocs_git_revision_date_localized_plugin.dates import get_date_formats

Expand Down Expand Up @@ -87,7 +85,7 @@ def get_git_commit_timestamp(
commit_timestamp = git.log(
realpath, date="unix", format="%at", diff_filter="A", no_show_signature=True, follow=True
)
# A file can be created multiple times, through a file renamed.
# A file can be created multiple times, through a file renamed.
# Commits are ordered with most recent commit first
# Get the oldest commit only
if commit_timestamp != "":
Expand Down Expand Up @@ -167,7 +165,7 @@ def get_date_formats_for_timestamp(
dict: Localized date variants.
"""
date_formats = get_date_formats(
unix_timestamp=commit_timestamp,
unix_timestamp=commit_timestamp,
time_zone=self.config.get("timezone"),
locale=locale,
custom_format=self.config.get('custom_format')
Expand All @@ -185,7 +183,7 @@ def add_spans(date_formats: Dict[str, str]) -> Dict[str, str]:
"""
for date_type, date_string in date_formats.items():
date_formats[date_type] = (
Markup('<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-%s">%s</span>')
'<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-%s">%s</span>'
% (date_type, date_string)
)
return date_formats
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mkdocs>=1.0
GitPython
babel>=2.7.0
pytz
markupsafe
pytz

0 comments on commit af27290

Please sign in to comment.