The + sign in the url.parse?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
50 views
for example there is a line
/?test=1&test1=+
performed in node.js
> url.parse('/?test=1&test1=+', true).query { test: '1', test1: '' }

the plus sign replaced by a space if you specify another sign such as a minus or equal then everything is OK. what could be the problem?
by | 50 views

2 Answers

0 like 0 dislike
Read RFC-1866, namely, 8.2.1
by
0 like 0 dislike
So in JS a plus sign, like, is a sign of bonding lines so for example when adding two strings must be cast to the type Number, for example when you subtract all normal. Just don't use plus in such queries
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users