[OpenLayers-Users] util.js: Line 585 encodedValue = encodeURIComponent(value);

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Thu Sep 18 08:07:28 EDT 2008


If your key is "key" and your value is "x?&c=f" then your url will be:
http://server/page?key=x?&=
Which the server will read as:
key = x?
c = f

With encoding yo get something like:
http://server/page?key=x%3F%26c%3Df
And the server will read it as:
key = x?&c=f

You can argue that you might want to add the extra c=f keypair,
but you should not add such a value there, because parsing the
key/value list other places becomes a real pain.

More info here:
http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp

Regards, Kenneth Skovhede, GEOGRAF A/S



Carolin Wengerter skrev:
> Why or when do I need the line 585 of code util.js?
>
> encodedValue = encodeURIComponent(value);
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   



More information about the Users mailing list