-
-
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
querify doesn't encode single quotes correctly #11695
Comments
On this page, how is the summary defined? Automatically, manually (using |
Manually as you can check on https://github.com/ys/bonjour/blob/main/content/posts/revision-leica/index.md?plain=1 |
Usage of the querify can be seen in https://github.com/ys/bonjour/blob/main/themes/simple/layouts/partials/opengraph.html#L9 And result is at https://yannickschutz.com/revision-leica/ |
I just tested |
The problem you are experiencing is closely related to #8910 (comment). Regardless of how you define the summary, it is passed through the markdown renderer, which converts certain punctuation characters to HTML entities. The
Option 1For a summary defined in front matter, you can access the raw value with:
But I'm not sure how forward-compatible that's going to be. See #11055. Option 2Change the character substitution rules in your site configuration: [markup.goldmark.extensions.typographer]
apostrophe = "'"
leftSingleQuote = "'"
rightSingleQuote = "'" Option 3Disable the typographer extension: [markup.goldmark.extensions.typographer]
disable = true Option 4Use a different front matter field, such as
To summarize, the |
Wow, thanks so much, it makes a lot more sense then... Will pick an option. Glad it is me and not the code... |
It looks like that |
Nevermind, it is because I use |
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)? 0.120.4Does this issue reproduce with the latest release? Yes
When doing
querify "lol" .Summary
on a page with asummary: Mon labo me le disait, y’a quelque chose de bizarre dans tes expositions.
The encoded string is
lol=Mon+labo+me+le+disait%2C+y%26rsquo%3Ba+quelque+chose+de+bizarre+dans+tes+expositions.
%26rsquo%3B
which is’
but should be%27
. Which is the correct way to URL encode apostrophe or single quote I think.The text was updated successfully, but these errors were encountered: