Stringify with arrayFormat: comma, wrongfully encode comma in return
See original GitHub issuewrong result with stringifying
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' })
return a=b%2Cc
when it should return a=b,c
because parsing ,
as reserved character per RFC 3986 should split the array if we used a parser withcomma: true
option
and %2C
(percent encoded comma) should be treated normally as text character
related to : #336 pr
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Output array as comma separated with querySelector
qs.stringify(oData, { arrayFormat: 'comma', encode: false }). encode: false is also used so the commas aren't URL encoded. With an input of:
Read more >str_getcsv - Manual - PHP
Parses a string input for fields in CSV format and returns an array containing the ... These tools do not escape commas or...
Read more >DAML SDK Documentation
We will see how we encode this in DAML in the next section. ... You can have many, either as a comma-separated list...
Read more >auth0-js - UNPKG
'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts ... charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma ......
Read more >parse.rs - source - GitHub Pages
These functions can return any syntax tree node that //! implements the [`Parse`] ... terminated by commas with //! // an optional trailing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
using
{ encode: false }
options to fix thisThis doesn’t actually appear to have been fixed. The latest version still outputs
a=b%2Cc
. In fact the unit test also confirms that is the current behaviour:Surely this is wrong though, as it means you can’t encode values that have commas in themselves?