GustavoFernandes / order-splitter

https://gustavofernandes.github.io/order-splitter/
MIT License
3 stars 3 forks source link

Whitespaces in names are not sanitized in URL #28

Closed Fostecks closed 7 years ago

Fostecks commented 7 years ago

The URL provided for users to copy will contain whitespaces if the member's names have whitespaces in them. For example:

https://gustavofernandes.github.io/order-splitter/index.html?tax=5.18&fee=4.78&tip=20&JOHN DOE=9.49

ghost commented 7 years ago

Do you want to replace them with %20 or something else like dashes?

http://stackoverflow.com/questions/497908/is-a-url-allowed-to-contain-a-space

GustavoFernandes commented 7 years ago

@Red-Thirteen Probably use something along the lines of encodeURI() or encodeURIComponent() functions.