PuzzleServer / mainpuzzleserver

The main repo for the Puzzle Hunt and Puzzleday servers.
MIT License
9 stars 32 forks source link

Freeform submissions incorrectly normalized #1081

Closed morganbr closed 3 months ago

morganbr commented 4 months ago

Freeform submissions with embedded puzzles are getting normalized (all caps, no spaces or punctuation). That breaks urls and other reading, we should ensure they go through the non-normalized path

jbodner09 commented 3 months ago

Quick way should be a one-line fix. Just add a ternary to https://github.com/PuzzleServer/mainpuzzleserver/blob/main/ServerCore/Pages/Submissions/Index.cshtml#L784 to use the raw text instead of the cleaned text if it's freeform. That way we won't need to verify if the API is ACTUALLY doing the right thing to normalize when not freeform. Might need to be careful using the ASP variable in the javascript though (note the shenanigans necessary to pass the boolean properly to the API).