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 #1097

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

Comments

@CelDaemon
Copy link

What happened?

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.

The issue can be easily reproduced by going to a URL such as: http://{host}:{port}/α

Hugo version

0.126.2

Theme version

3.29.0

What browsers are you seeing the problem on?

Firefox

More information about the browser

Firefox 132.0.1, Fedora 41

Relevant log output

Start building sites … 
hugo v0.126.2+extended linux/amd64 BuildDate=2024-07-18T00:00:00+00:00 VendorInfo=Fedora:0.126.2-3.fc41


                   | EN  
-------------------+-----
  Pages            | 37  
  Paginator pages  |  0  
  Non-page files   |  4  
  Static files     |  1  
  Processed images | 14  
  Aliases          | 13  
  Cleaned          |  0  

Total in 68 ms

Link to Minimal Reproducible Example

https://github.com/CelDaemon/unicode-404-repro

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