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

This commit is contained in:
rlx 2011-10-06 06:02:54 +00:00
parent f2490fe771
commit f1bfb545f1

View file

@ -313,7 +313,7 @@ Ox.URL = function(options) {
|| Ox.getPositionById(self.options.findKeys, condition.key) == -1
) {
// missing operator or unknown key
condition = {key: '*', value: str, operator: '='};
condition = {key: '*', value: condition.value, operator: '='};
}
if (['=', '!='].indexOf(condition.operator) > -1) {
if (condition.value[0] == '*') {
@ -415,7 +415,6 @@ Ox.URL = function(options) {
}
function parseURL(str, callback) {
Ox.print('pU', str)
// fixme: removing trailing slash makes it impossible to search for '/'
str = str.replace(/(^\/|\/$)/g, '');
var parts = str.split('/'),