From 851aa386c08e0cb2c0ccdc49e535385ee6962cee Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 6 Oct 2011 06:07:31 +0000 Subject: [PATCH] fix a bug in Ox.URL where URLs of the form '/unknown=foo' would not be parsed correctly --- source/Ox.UI/js/Core/Ox.URL.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/Ox.UI/js/Core/Ox.URL.js b/source/Ox.UI/js/Core/Ox.URL.js index 6967fe65..ff3b4591 100644 --- a/source/Ox.UI/js/Core/Ox.URL.js +++ b/source/Ox.UI/js/Core/Ox.URL.js @@ -308,11 +308,9 @@ Ox.URL = function(options) { return false; } }); - if ( - !condition.operator - || Ox.getPositionById(self.options.findKeys, condition.key) == -1 - ) { - // missing operator or unknown key + if (Ox.getPositionById(self.options.findKeys, condition.key) == -1) { + condition = {key: '*', value: str, operator: '='}; + } else if (!condition.operator) { condition = {key: '*', value: condition.value, operator: '='}; } if (['=', '!='].indexOf(condition.operator) > -1) {