[Laszlo-user] URI-encoding on LzParam.addObject(o)?

P T Withington ptw at openlaszlo.org
Thu Jul 12 04:04:59 PDT 2007


On 2007-07-12, at 02:35 EDT, Robin Sheat wrote:

> The docs for LzParam say:
> -----------------
> addObject()
> LzParam.addObject(o)
>
> Adds a series of name/value pairs from an object
> Parameters
> Name 	Type 	Desc
> o 	Object 	An object containing name/value pairs to add
>
> addValue()
> LzParam.addValue(name, val, enc)
>
> Adds a value. Does not replace existing entries with the same name.
> Parameters
> Name 	Type 	Desc
> name 	String 	The name to set - must evaluate to a string
> val 	String 	The value to set
> enc 	Boolean 	If true, URI-encodes the value
> -----------------
>
> Does addObject() do URI encoding of the values? Is there a way to  
> make it do
> that?

It appears not.

[cc-ing Henry who is more familiar with the uses of LzParam]

But (optional) encoding when setting the params seems wrong-headed.   
I would think you would want your params to be stored unadulterated,  
and you would call for encoding when converting them to a query  
string.  And presumably you would always want them encoded when  
represented as a query.


More information about the Laszlo-user mailing list