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

Symbols don't render correctly in links #55

Closed
sophiabrandt opened this issue May 11, 2021 · 4 comments
Closed

Symbols don't render correctly in links #55

sophiabrandt opened this issue May 11, 2021 · 4 comments

Comments

@sophiabrandt
Copy link

Thanks for creating this theme.

In my blog I have several links where the link text contains an ampersand.

Example:

Dungeons & Dragons

The theme renders them like so (it shows & instead of &):

Dungeons & Dragons

Is there a way to opt out of HTML escaping for links?
Just putting a \ before the & does not seem to work.

I know that Hugo has a function called HtmlUnescape, but as I'm using plain markdown, I am unsure on how to incorporate that function.

This post is the most relevant on the Hugo forums that I could find, but it seems to address a different issue:
https://discourse.gohugo.io/t/ampersand-character-in-markdown-links/25269

Any tips are appreciated.

@dataCobra
Copy link
Owner

Hello @sophiabrandt,

Thank you for reporting this problem.

I'll look into this and answer you when I solved it.

Regards,
Ben

@dataCobra dataCobra changed the title How to render & (ampersands) correctly in links? Symbols don't render correctly in links May 11, 2021
@dataCobra
Copy link
Owner

I've found a solution to this problem and created a fix for that.

If you use the repository to build your website you only need to pull the changes.

I'll now create a release file. Might take a few minutes before it shows up in the releases.

@dataCobra
Copy link
Owner

The new release is now also finally available.

I hope this fixes your problem.

Please give me feedback if the fix worked or not.

Regards,
Ben

@sophiabrandt
Copy link
Author

@dataCobra works splendidly, thank you very much! 👍

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

No branches or pull requests

2 participants