gw1500se Posted June 11, 2020 Share Posted June 11, 2020 I have an HTML input tag that can contain spaces. When I read the 'post' data the spaces are changed to '+' rather than '%20'. I run that data through Python 3 'unquote' and all the special characters are converted as appropriate. I suppose I can replace the '+' with a space but that raises 2 questions: 1. Why is the space not sent as '%20'? 2. How do I tell the difference between '+' as a space and '+' as a character in the string? TIA. Quote Link to comment Share on other sites More sharing options...
requinix Posted June 11, 2020 Share Posted June 11, 2020 1. Because + is also allowed for a space. 2. An actual plus will be encoded as %2B. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted June 11, 2020 Author Share Posted June 11, 2020 Thanks. Makes no sense to me. It is inconsistent with other special characters. Quote Link to comment Share on other sites More sharing options...
requinix Posted June 11, 2020 Share Posted June 11, 2020 Spaces are common and a + is a lot easier to skim over than %20. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.