fix a bug in Ox.URL where URLs of the form '/unknown=foo' would not be parsed correctly

This commit is contained in:
rlx 2011-10-06 06:07:31 +00:00
parent f1bfb545f1
commit 851aa386c0

View file

@ -308,11 +308,9 @@ Ox.URL = function(options) {
return false; return false;
} }
}); });
if ( if (Ox.getPositionById(self.options.findKeys, condition.key) == -1) {
!condition.operator condition = {key: '*', value: str, operator: '='};
|| Ox.getPositionById(self.options.findKeys, condition.key) == -1 } else if (!condition.operator) {
) {
// missing operator or unknown key
condition = {key: '*', value: condition.value, operator: '='}; condition = {key: '*', value: condition.value, operator: '='};
} }
if (['=', '!='].indexOf(condition.operator) > -1) { if (['=', '!='].indexOf(condition.operator) > -1) {