-
-
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
Goldmark incorrectly parses http addresses that end in a quote #10407
Comments
I've noticed that setting Also note: This may be separate bug, but if you escape the quotes
it will create the hyperlink at all. Also, also: If you only escape the trailing quote:
It will create the hyperlink correctly, but the text will begin with a smart (curly) quote and end with a straight quote. Rendered as:
|
This may be caused by the linkify extension, or the interaction between linkify and typographer. The linkify extension renders strings such as With both extensions enabled... These work:
These fail (note the trailing slash):
I'm not a huge fan of the autolink extension. I would prefer to be in control of what is and is not rendered as an anchor element. Both of these work regardless of whether or not the linkify extension is enabled.
In any event, this needs to be reported upstream. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
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
)?v0.105.0-DEV-c10931404f605b88067cb66da7ec333ddeb24cc0
Also tried with a local build of
v0.104
, and a downloaded binary ofv0.102
This bug exists as of commit SHA c109314
Does this issue reproduce with the latest release?
Yes, latest stable and the latest build off of main
issue description
when you render a page that includes an http address with a slash (i.e. the address has a path) surrounded in double quotes, the trailing quote is considered part of the address and url-encoded into the href link. This makes the link invalid. It seems that a slash needs to be in the address to trigger the bug (not counting the slashes for the URI component), so
"https://google.com"
will NOT trigger this bug, but"https://google.com/"
will and"https://google.com/mail"
will.to reproduce
create an page with the content
and it will be rendered as
Pic:
The text was updated successfully, but these errors were encountered: