TokyoHackerGirls / TokyoHackerGirls.github.io

Tokyo Hacker Girls site
MIT License
15 stars 2 forks source link

Unicode characters incorrectly filled into the search bar on 404 pages #4

Open CelDaemon opened 5 hours ago

CelDaemon commented 5 hours ago

When following a link that is no longer valid, a 404 page appears containing a search bar. This search bar has relevant keywords from the URL pre-filled, however this behaviour is handled incorrectly when the URL contains characters that are represented with URI escape sequences.

In these cases, the keywords are directly filled into the search bar without first being decoded from the escape sequences.

image

CelDaemon commented 5 hours ago

It seems to be an issue in the hugo theme, a piece of javascript that skips the decoding of special characters:

https://github.com/CaiJimmy/hugo-theme-stack/blob/839fbd0ecb5bba381f721f31f5195fb6517fc260/layouts/404.html#L35

CelDaemon commented 4 hours ago

I have created an issue report on their side, as well as a simple fix.