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;
}
});
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) {