|
|
|
@ -1593,6 +1593,7 @@ module.exports = Connection;
|
|
|
|
|
function escape(str) {
|
|
|
|
|
return str.replace(RE_BACKSLASH, '\\\\').replace(RE_DBLQUOTE, '\\"');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function validateUIDList(uids, noThrow) {
|
|
|
|
|
for (var i = 0, len = uids.length, intval; i < len; ++i) {
|
|
|
|
|
if (typeof uids[i] === 'string') {
|
|
|
|
@ -1615,16 +1616,15 @@ function validateUIDList(uids, noThrow) {
|
|
|
|
|
uids[i] = intval;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function hasNonASCII(str) {
|
|
|
|
|
var ret = false;
|
|
|
|
|
for (var i = 0, len = str.length; i < len; ++i) {
|
|
|
|
|
if (str.charCodeAt(i) > 0x7F) {
|
|
|
|
|
ret = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (str.charCodeAt(i) > 0x7F)
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return ret;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function buildString(str) {
|
|
|
|
|
if (typeof str !== 'string')
|
|
|
|
|
str = ''+str;
|
|
|
|
@ -1635,6 +1635,7 @@ function buildString(str) {
|
|
|
|
|
} else
|
|
|
|
|
return '"' + escape(str) + '"';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function buildSearchQuery(options, extensions, info, isOrChild) {
|
|
|
|
|
var searchargs = '', err, val;
|
|
|
|
|
for (var i = 0, len = options.length; i < len; ++i) {
|
|
|
|
|