diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index f1ba9b7d..b59b88a2 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -627,14 +627,11 @@ Ox.URL = function(options) { // missing operator or unknown key condition = {key: '*', value: str, operator: '='}; } - if ( - ['=', '!='].indexOf(condition.operator) > -1 - && condition.value != '*' - ) { - if (condition.value[0] == '*') { + if (['=', '!='].indexOf(condition.operator) > -1) { + if (Ox.startsWith(condition.value, '*') && !Ox.endsWith(condition.value, '*')) { condition.value = condition.value.slice(1); condition.operator = condition.operator.replace('=', '$') - } else if (condition.value[condition.value.length - 1] == '*') { + } else if (Ox.endsWith(condition.value, '*') && !Ox.startsWith(condition.value, '*')) { condition.value = condition.value.slice(0, -1); condition.operator = condition.operator.replace('=', '^') }