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

Double html encoding in links #249

Open
TheGroundZero opened this issue Jan 18, 2021 · 2 comments
Open

Double html encoding in links #249

TheGroundZero opened this issue Jan 18, 2021 · 2 comments

Comments

@TheGroundZero
Copy link

When a 'special' character is used, it gets encoded.
However, this encoded string is encoding again if it's part of an anchor tag (link).

For example:

[Shelly H&T][shelly_ht]
[Aaron's GitHub][atc_mithermometer]

[shelly_ht]: <https://shelly.cloud/products/shelly-humidity-temperature-smart-home-automation-sensor/> "Shelly Humidity & Temperature sensor"
[atc_mithermometer]: <https://github.com/atc1441/ATC_MiThermometer> "atc1441/ATC_MiThermometer"

Results in

<a href="https://shelly.cloud/products/shelly-humidity-temperature-smart-home-automation-sensor/" title="Shelly Humidity &amp; Temperature sensor" target="_blank">Shelly H&amp;amp;T</a>
<a href="https://github.com/atc1441/ATC_MiThermometer" title="atc1441/ATC_MiThermometer" target="_blank">Aaron&amp;rsquo;s GitHub</a>

Which is displayed as

Shelly H&amp;T
Aaron&rsquo;s GitHub

See live example at https://sequr.be/blog/2021/01/home-automation-room-temperature-monitoring-using-xiaomi-temperature-sensor-esp32-and-esphome/

@rhazdon
Copy link
Owner

rhazdon commented Jan 20, 2021

Hey @TheGroundZero,

yeah... I see, this is really annoying. :D

Well, the theme itself just displays the content of the post without additional post processing:

But I've found a closed issue on hugo's github issues that describes the same issue. What version do you use of hugo?

@TheGroundZero
Copy link
Author

Hi

$ hugo version
Hugo Static Site Generator v0.80.0/extended linux/amd64 BuildDate: 2020-12-31T20:02:59Z
$ sudo snap refresh hugo
snap "hugo" has no updates available

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