From b8feb3c22e56d97974e061b02701f30fb4344609 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 17 Sep 2010 16:48:11 +0000 Subject: [PATCH] Making it so OpenLayers.Util.getParameters doesn't fail with improperly encoded query string parameter names or values. We expect parameter names and values to be encoded according to RFC 3986 (http://labs.apache.org/webarch/uri/rfc/rfc3986.html). However, there are cases where browsers will not use utf-8 character encoding in generating a URL. In these cases, the unescape function provides a fallback that tries to use the ISO Latin character set. This may not always be a good second assumption, but it is better than failing to load the library when the first assumption fails. r=ahocevar (closes #2821) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10771 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Util.js | 22 ++++++++++++++++++---- tests/Util.html | 15 ++++++++++++++- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index d197eab502..48186c2d56 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1062,11 +1062,25 @@ OpenLayers.Util.getParameters = function(url) { for(var i=0, len=pairs.length; i +