chiefwigms / picobrew_pico

MIT License
149 stars 63 forks source link

Recipes named with a leading space do not appear in the library #295

Closed nycedwardd closed 3 years ago

nycedwardd commented 3 years ago

Saving a recipe with a leading space creates the proper json file, with a leading underscore. This is expected behavior as all spaces are converted to underscore in the file name.

Steps to reproduce:

Corrective action:

This is an extremely minor issue, I only wanted to document it in case someone else came up against it. An easy fix would be to trim leading spaces before replacing spaces with an underscore.

tmack8001 commented 3 years ago

Triming any leading and trailing whitespace is a good call for us to do for sure. Likely a good thing to do for any and all step names within the recipe as well.

FYI you should be able to rename the recipe for within the web UI and shouldn't need to do so from the file directory.

nycedwardd commented 3 years ago

Actually, you can't change it in the ui. That's the whole bug. If there is a leading space it won't show up.

tmack8001 commented 3 years ago

Ah yes, well just don't do that 😜 .

tmack8001 commented 3 years ago

Though agree the server should be a bit more accepting of user input and sanitize it.

tmack8001 commented 3 years ago

Should be fixed with latest PR