Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland: For jinja autoescape, mark HTML strings as safe, not needing escaping #128

Closed
wants to merge 1 commit into from

Conversation

oprypin
Copy link
Contributor

@oprypin oprypin commented Feb 3, 2024

(The previous version of this change had a mistake that was inserting Markup in the wrong place.)


Original description:

For contexts where Jinja's autoescape is enabled, this is necessary for keeping this string working without it being escaped.
(This might become the default behavior in the next version of MkDocs)

If so, the HTML will be pasted like this into the doc:

<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 17, 2022</span>

When Jinja's autoescape is not enabled, there's no change in behavior.

…escaping

(The previous version of this change had a mistake that was inserting Markup in the wrong place.)

For contexts where Jinja's autoescape is enabled, this is necessary for keeping this string working without it being escaped.
(This might become the default behavior in the next version of MkDocs)

If so, the HTML will be pasted like this into the doc:

    <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 17, 2022</span>

When Jinja's autoescape is not enabled, there's no change in behavior.
@oprypin
Copy link
Contributor Author

oprypin commented Feb 4, 2024

Will not be necessary, not moving forward with this change in mkdocs for the near future.

@oprypin oprypin deleted the esc2 branch February 4, 2024 22:02
@timvink
Copy link
Owner

timvink commented Feb 6, 2024

Just wanted to say I really appreciate you pushing the mkdocs ecosystem forward, and even taking the effort to contribute downstream to plugins!

From my side, it's not a problem to introduce changes that require plugins to upgrade -- if it means we can move mkdocs forward.

Thanks for all your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants