Michael Peters wrote:
> Michael Peters wrote:
>> In the process, blank values are being
>> lost. Here's an example:
>>
>>   var query = 'foo=bar&foo=&foo=&foo=baz';
>>   alert('BEFORE: ' + query + "\nAFTER :" +
>>   $H(query.toQueryParams()).toQueryString());
> 
> The reason this breaks is because toQueryParams() translates
> 'foo=bar&foo=&foo=baz' into { foo: ['bar', undefined, 'baz] }. And
> toQueryString() translates undefined into non-existant instead of blank.


Sorry to keep answering my own posts, but having re-read this thread -
http://groups.google.com/group/prototype-core/browse_thread/thread/0140fdf88eed057d/86ba728fb611687b#86ba728fb611687b
it seems that undefined is meant to remove the element from the serialization.
So the problem is that String.toQueryParams() is changing an empty element into
undefined instead of either null or "". Right? If so should I open a ticket and
attach a patch?

--
Michael Peters
Developer
Plus Three, LP

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to