-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
tpl/tplimpl: Fix double-escaping in opengraph template #12425
tpl/tplimpl: Fix double-escaping in opengraph template #12425
Conversation
@@ -1,14 +1,14 @@ | |||
<meta property="og:url" content="{{ .Permalink }}"> | |||
|
|||
{{- with or site.Title site.Params.title | plainify }} | |||
{{- with or site.Title site.Params.title | .RenderString | plainify | htmlUnescape }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where the escapes coming from? Front matter:
Passing I can split this into three PR's each with their own issue:
I will add a test for #12418, and add additional conditions to that test with each subsequent PR. Believe me, I am as fatigued by this as you are. |
Using Markdown syntax in I suggest that we fix the bug with as little change as possible. People can create their own templates if they need special things. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @jmooring!
See inline for one nit.
When
There are three test cases that I need to include, with examples here: We've got way too many ways to define Summary, each with their own idiosyncrasies: |
@jmooring OK, So, {{- with or site.Title site.Params.title | plainify | htmlUnescape }} Etc. should work (??) and is perfectly fine. Adding |
OK, we pass markdown through un-rendered. To handle the manual summary divider in one of the (now) 5 test cases, we need to chomp the trailing newline:
Hopefully that's OK. |
71b7282
to
e918e70
Compare
Closes #12418