Author: johnh
Date: Thu Feb 3 20:16:16 2011
New Revision: 1066939
URL: http://svn.apache.org/viewvc?rev=1066939&view=rev
Log:
Try/catch around unescaping of string values, to avoid thrown exceptions from
getUrlParameters().
Modified:
shindig/trunk/features/src/main/javascript/features/core.util.urlparams/urlparams.js
Modified:
shindig/trunk/features/src/main/javascript/features/core.util.urlparams/urlparams.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.util.urlparams/urlparams.js?rev=1066939&r1=1066938&r2=1066939&view=diff
==============================================================================
---
shindig/trunk/features/src/main/javascript/features/core.util.urlparams/urlparams.js
(original)
+++
shindig/trunk/features/src/main/javascript/features/core.util.urlparams/urlparams.js
Thu Feb 3 20:16:16 2011
@@ -81,7 +81,11 @@ gadgets['util'] = function() {
// argname. Unclear on if it should do:
// argname = argname.replace(/\+/g, " ");
value = value.replace(/\+/g, ' ');
- parsed[argName] = unesc(value);
+ try {
+ parsed[argName] = unesc(value);
+ } catch (e) {
+ // Undecodable/invalid value; ignore.
+ }
}
if (no_opt_url) {
// Cache current-window params in parameters var.