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

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

Open
CelDaemon opened this issue Nov 16, 2024 · 2 comments
Open

Comments

@CelDaemon
Copy link

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
Copy link
Author

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
Copy link
Author

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

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

1 participant