Skip to content

<a href>'s unescaped differently dependent on locale #27

Description

@OrIdow6
echo '<html><body><a href="%2525CCfile.html" /></body></html>' > file.html
python3 -m http.server 8888 &
env -i ../wget-lua/src/wget -nv --recursive http://127.0.0.1:8888/file.html
env -i LANG=en_US.UTF-8 ../wget-lua/src/wget -nv --recursive http://127.0.0.1:8888/file.html

The outputs are respectively

...
2024-12-13 16:48:29 ERROR 404: File not found.
127.0.0.1 - - [13/Dec/2024 16:48:29] "GET /%25CCfile.html HTTP/1.1" 404 -
http://127.0.0.1:8888/%25CCfile.html:
2024-12-13 16:48:29 ERROR 404: File not found.
...

and

...
2024-12-13 16:48:52 ERROR 404: File not found.
127.0.0.1 - - [13/Dec/2024 16:48:52] code 404, message File not found
127.0.0.1 - - [13/Dec/2024 16:48:52] "GET /%2525CCfile.html HTTP/1.1" 404 -
http://127.0.0.1:8888/%2525CCfile.html:
2024-12-13 16:48:52 ERROR 404: File not found.
...

Notice the difference in the filenames it tries to GET.
The behavior of the second is the one I wanted (I don't know if it's correct according to standards, but I hope that it is), but the first is what we get in warrior projects because something in Seesaw clears the environment.

My dev environment is not the official Docker image and there's a small chance that a difference between my installation and that is causing this; but this did come to my attention due to a crash in someone running a production Cohost script so that seems unlikely.

May investigate this myself but Cohost seems liable to go down soon so that can wait.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions