cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject [05/51] [partial] CB-7087 Retire blackberry10/ directory
Date Mon, 07 Jul 2014 21:43:11 GMT
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/lib/entities.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/lib/entities.js b/blackberry10/node_modules/validator/lib/entities.js
deleted file mode 100755
index ed80911..0000000
--- a/blackberry10/node_modules/validator/lib/entities.js
+++ /dev/null
@@ -1,291 +0,0 @@
-var entities = {
-    ' ': '\u00a0',
-    '¡': '\u00a1',
-    '¢': '\u00a2',
-    '£': '\u00a3',
-    '¤': '\u20ac',
-    '¥': '\u00a5',
-    '¦': '\u0160',
-    '§': '\u00a7',
-    '¨': '\u0161',
-    '©': '\u00a9',
-    'ª': '\u00aa',
-    '«': '\u00ab',
-    '¬': '\u00ac',
-    '­': '\u00ad',
-    '®': '\u00ae',
-    '¯': '\u00af',
-    '°': '\u00b0',
-    '±': '\u00b1',
-    '²': '\u00b2',
-    '³': '\u00b3',
-    '´': '\u017d',
-    'µ': '\u00b5',
-    '¶': '\u00b6',
-    '·': '\u00b7',
-    '¸': '\u017e',
-    '¹': '\u00b9',
-    'º': '\u00ba',
-    '»': '\u00bb',
-    '¼': '\u0152',
-    '½': '\u0153',
-    '¾': '\u0178',
-    '¿': '\u00bf',
-    'À': '\u00c0',
-    'Á': '\u00c1',
-    'Â': '\u00c2',
-    'Ã': '\u00c3',
-    'Ä': '\u00c4',
-    'Å': '\u00c5',
-    'Æ': '\u00c6',
-    'Ç': '\u00c7',
-    'È': '\u00c8',
-    'É': '\u00c9',
-    'Ê': '\u00ca',
-    'Ë': '\u00cb',
-    'Ì': '\u00cc',
-    'Í': '\u00cd',
-    'Î': '\u00ce',
-    'Ï': '\u00cf',
-    'Ð': '\u00d0',
-    'Ñ': '\u00d1',
-    'Ò': '\u00d2',
-    'Ó': '\u00d3',
-    'Ô': '\u00d4',
-    'Õ': '\u00d5',
-    'Ö': '\u00d6',
-    '×': '\u00d7',
-    'Ø': '\u00d8',
-    'Ù': '\u00d9',
-    'Ú': '\u00da',
-    'Û': '\u00db',
-    'Ü': '\u00dc',
-    'Ý': '\u00dd',
-    'Þ': '\u00de',
-    'ß': '\u00df',
-    'à': '\u00e0',
-    'á': '\u00e1',
-    'â': '\u00e2',
-    'ã': '\u00e3',
-    'ä': '\u00e4',
-    'å': '\u00e5',
-    'æ': '\u00e6',
-    'ç': '\u00e7',
-    'è': '\u00e8',
-    'é': '\u00e9',
-    'ê': '\u00ea',
-    'ë': '\u00eb',
-    'ì': '\u00ec',
-    'í': '\u00ed',
-    'î': '\u00ee',
-    'ï': '\u00ef',
-    'ð': '\u00f0',
-    'ñ': '\u00f1',
-    'ò': '\u00f2',
-    'ó': '\u00f3',
-    'ô': '\u00f4',
-    'õ': '\u00f5',
-    'ö': '\u00f6',
-    '÷': '\u00f7',
-    'ø': '\u00f8',
-    'ù': '\u00f9',
-    'ú': '\u00fa',
-    'û': '\u00fb',
-    'ü': '\u00fc',
-    'ý': '\u00fd',
-    'þ': '\u00fe',
-    'ÿ': '\u00ff',
-    '"': '\u0022',
-    '<': '\u003c',
-    '>': '\u003e',
-    ''': '\u0027',
-    '−': '\u2212',
-    'ˆ': '\u02c6',
-    '˜': '\u02dc',
-    'Š': '\u0160',
-    '‹': '\u2039',
-    'Œ': '\u0152',
-    '‘': '\u2018',
-    '’': '\u2019',
-    '“': '\u201c',
-    '”': '\u201d',
-    '•': '\u2022',
-    '–': '\u2013',
-    '—': '\u2014',
-    '™': '\u2122',
-    'š': '\u0161',
-    '›': '\u203a',
-    'œ': '\u0153',
-    'Ÿ': '\u0178',
-    'ƒ': '\u0192',
-    'Α': '\u0391',
-    'Β': '\u0392',
-    'Γ': '\u0393',
-    'Δ': '\u0394',
-    'Ε': '\u0395',
-    'Ζ': '\u0396',
-    'Η': '\u0397',
-    'Θ': '\u0398',
-    'Ι': '\u0399',
-    'Κ': '\u039a',
-    'Λ': '\u039b',
-    'Μ': '\u039c',
-    'Ν': '\u039d',
-    'Ξ': '\u039e',
-    'Ο': '\u039f',
-    'Π': '\u03a0',
-    'Ρ': '\u03a1',
-    'Σ': '\u03a3',
-    'Τ': '\u03a4',
-    'Υ': '\u03a5',
-    'Φ': '\u03a6',
-    'Χ': '\u03a7',
-    'Ψ': '\u03a8',
-    'Ω': '\u03a9',
-    'α': '\u03b1',
-    'β': '\u03b2',
-    'γ': '\u03b3',
-    'δ': '\u03b4',
-    'ε': '\u03b5',
-    'ζ': '\u03b6',
-    'η': '\u03b7',
-    'θ': '\u03b8',
-    'ι': '\u03b9',
-    'κ': '\u03ba',
-    'λ': '\u03bb',
-    'μ': '\u03bc',
-    'ν': '\u03bd',
-    'ξ': '\u03be',
-    'ο': '\u03bf',
-    'π': '\u03c0',
-    'ρ': '\u03c1',
-    'ς': '\u03c2',
-    'σ': '\u03c3',
-    'τ': '\u03c4',
-    'υ': '\u03c5',
-    'φ': '\u03c6',
-    'χ': '\u03c7',
-    'ψ': '\u03c8',
-    'ω': '\u03c9',
-    'ϑ': '\u03d1',
-    'ϒ': '\u03d2',
-    'ϖ': '\u03d6',
-    ' ': '\u2002',
-    ' ': '\u2003',
-    ' ': '\u2009',
-    '‌': '\u200c',
-    '‍': '\u200d',
-    '‎': '\u200e',
-    '‏': '\u200f',
-    '‚': '\u201a',
-    '„': '\u201e',
-    '†': '\u2020',
-    '‡': '\u2021',
-    '…': '\u2026',
-    '‰': '\u2030',
-    '′': '\u2032',
-    '″': '\u2033',
-    '‾': '\u203e',
-    '⁄': '\u2044',
-    '€': '\u20ac',
-    'ℑ': '\u2111',
-    '℘': '\u2118',
-    'ℜ': '\u211c',
-    'ℵ': '\u2135',
-    '←': '\u2190',
-    '↑': '\u2191',
-    '→': '\u2192',
-    '↓': '\u2193',
-    '↔': '\u2194',
-    '↵': '\u21b5',
-    '⇐': '\u21d0',
-    '⇑': '\u21d1',
-    '⇒': '\u21d2',
-    '⇓': '\u21d3',
-    '⇔': '\u21d4',
-    '∀': '\u2200',
-    '∂': '\u2202',
-    '∃': '\u2203',
-    '∅': '\u2205',
-    '∇': '\u2207',
-    '∈': '\u2208',
-    '∉': '\u2209',
-    '∋': '\u220b',
-    '∏': '\u220f',
-    '∑': '\u2211',
-    '∗': '\u2217',
-    '√': '\u221a',
-    '∝': '\u221d',
-    '∞': '\u221e',
-    '∠': '\u2220',
-    '∧': '\u2227',
-    '∨': '\u2228',
-    '∩': '\u2229',
-    '∪': '\u222a',
-    '∫': '\u222b',
-    '∴': '\u2234',
-    '∼': '\u223c',
-    '≅': '\u2245',
-    '≈': '\u2248',
-    '≠': '\u2260',
-    '≡': '\u2261',
-    '≤': '\u2264',
-    '≥': '\u2265',
-    '⊂': '\u2282',
-    '⊃': '\u2283',
-    '⊄': '\u2284',
-    '⊆': '\u2286',
-    '⊇': '\u2287',
-    '⊕': '\u2295',
-    '⊗': '\u2297',
-    '⊥': '\u22a5',
-    '⋅': '\u22c5',
-    '⌈': '\u2308',
-    '⌉': '\u2309',
-    '⌊': '\u230a',
-    '⌋': '\u230b',
-    '⟨': '\u2329',
-    '⟩': '\u232a',
-    '◊': '\u25ca',
-    '♠': '\u2660',
-    '♣': '\u2663',
-    '♥': '\u2665',
-    '♦': '\u2666'
-};
-
-exports.decode = function (str) {
-    if (!~str.indexOf('&')) return str;
-
-    //Decode literal entities
-    for (var i in entities) {
-        str = str.replace(new RegExp(i, 'g'), entities[i]);
-    }
-
-    //Decode hex entities
-    str = str.replace(/&#x(0*[0-9a-f]{2,5});?/gi, function (m, code) {
-        return String.fromCharCode(parseInt(+code, 16));
-    });
-
-    //Decode numeric entities
-    str = str.replace(/&#([0-9]{2,4});?/gi, function (m, code) {
-        return String.fromCharCode(+code);
-    });
-
-    str = str.replace(/&/g, '&');
-
-    return str;
-}
-
-exports.encode = function (str) {
-    str = str.replace(/&/g, '&');
-
-    //IE doesn't accept '
-    str = str.replace(/'/g, ''');
-
-    //Encode literal entities
-    for (var i in entities) {
-        str = str.replace(new RegExp(entities[i], 'g'), i);
-    }
-
-    return str;
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/lib/filter.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/lib/filter.js b/blackberry10/node_modules/validator/lib/filter.js
deleted file mode 100755
index a7023d2..0000000
--- a/blackberry10/node_modules/validator/lib/filter.js
+++ /dev/null
@@ -1,102 +0,0 @@
-var entities = require('./entities');
-var xss = require('./xss');
-
-var Filter = exports.Filter = function() {}
-
-var whitespace = '\\r\\n\\t\\s';
-
-Filter.prototype.modify = function(str) {
-    this.str = str;
-}
-
-Filter.prototype.wrap = function (str) {
-    return str;
-}
-
-Filter.prototype.value = function () {
-    return this.str;
-}
-
-Filter.prototype.chain = function () {
-    this.wrap = function () { return this };
-    return this;
-}
-
-//Create some aliases - may help code readability
-Filter.prototype.convert = Filter.prototype.sanitize = function(str) {
-    this.str = str;
-    return this;
-}
-
-Filter.prototype.xss = function(is_image) {
-    this.modify(xss.clean(this.str, is_image));
-    return this.wrap(this.str);
-}
-
-Filter.prototype.entityDecode = function() {
-    this.modify(entities.decode(this.str));
-    return this.wrap(this.str);
-}
-
-Filter.prototype.entityEncode = function() {
-    this.modify(entities.encode(this.str));
-    return this.wrap(this.str);
-}
-
-Filter.prototype.ltrim = function(chars) {
-    chars = chars || whitespace;
-    this.modify(this.str.replace(new RegExp('^['+chars+']+', 'g'), ''));
-    return this.wrap(this.str);
-}
-
-Filter.prototype.rtrim = function(chars) {
-    chars = chars || whitespace;
-    this.modify(this.str.replace(new RegExp('['+chars+']+$', 'g'), ''));
-    return this.wrap(this.str);
-}
-
-Filter.prototype.trim = function(chars) {
-    chars = chars || whitespace;
-    this.modify(this.str.replace(new RegExp('^['+chars+']+|['+chars+']+$', 'g'), ''));
-    return this.wrap(this.str);
-}
-
-Filter.prototype.ifNull = function(replace) {
-    if (!this.str || this.str === '') {
-        this.modify(replace);
-    }
-    return this.wrap(this.str);
-}
-
-Filter.prototype.toFloat = function() {
-    this.modify(parseFloat(this.str));
-    return this.wrap(this.str);
-}
-
-Filter.prototype.toInt = function(radix) {
-    radix = radix || 10;
-    this.modify(parseInt(this.str, radix));
-    return this.wrap(this.str);
-}
-
-//Any strings with length > 0 (except for '0' and 'false') are considered true,
-//all other strings are false
-Filter.prototype.toBoolean = function() {
-    if (!this.str || this.str == '0' || this.str == 'false' || this.str == '') {
-        this.modify(false);
-    } else {
-        this.modify(true);
-    }
-    return this.wrap(this.str);
-}
-
-//String must be equal to '1' or 'true' to be considered true, all other strings
-//are false
-Filter.prototype.toBooleanStrict = function() {
-    if (this.str == '1' || this.str == 'true') {
-        this.modify(true);
-    } else {
-        this.modify(false);
-    }
-    return this.wrap(this.str);
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/lib/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/lib/index.js b/blackberry10/node_modules/validator/lib/index.js
deleted file mode 100755
index 5dc34fd..0000000
--- a/blackberry10/node_modules/validator/lib/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-exports.Validator = require('./validator').Validator;
-exports.Filter = require('./filter').Filter;
-exports.validators = require('./validators');
-
-exports.entities = require('./entities');
-
-//Quick access methods
-exports.sanitize = exports.convert = function(str) {
-    var filter = new exports.Filter();
-    return filter.sanitize(str);
-}
-
-exports.check = exports.validate = exports.assert = function(str, fail_msg) {
-    var validator = new exports.Validator();
-    return validator.check(str, fail_msg);
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/lib/validator.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/lib/validator.js b/blackberry10/node_modules/validator/lib/validator.js
deleted file mode 100644
index 7b431a3..0000000
--- a/blackberry10/node_modules/validator/lib/validator.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var validators = require('./validators');
-var defaultError = require('./defaultError');
-
-var Validator = exports.Validator = function() {}
-
-Validator.prototype.error = function (msg) {
-    throw new Error(msg);
-    return this;
-};
-
-Validator.prototype.check = function(str, fail_msg) {
-    this.str = (str == null || (isNaN(str) && str.length == undefined)) ? '' : str;
-    // Convert numbers to strings but keep arrays/objects
-    if (typeof this.str == 'number') {
-        this.str += '';
-    }
-    this.msg = fail_msg;
-    this._errors = this._errors || [];
-    return this;
-}
-
-for (var key in validators) {
-    if (validators.hasOwnProperty(key)) {
-        (function (key) {
-            Validator.prototype[key] = function() {
-                var args = Array.prototype.slice.call(arguments);
-                args.unshift(this.str);
-                if(!validators[key].apply(this, args)) {
-                    return this.error(this.msg || defaultError[key]);
-                }
-                return this;
-            };
-        })(key);
-    }
-}
-
-//Create some aliases - may help code readability
-Validator.prototype.validate = Validator.prototype.check;
-Validator.prototype.assert = Validator.prototype.check;
-Validator.prototype.isFloat = Validator.prototype.isDecimal;
-Validator.prototype.is = Validator.prototype.regex;
-Validator.prototype.not = Validator.prototype.notRegex;

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/lib/validators.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/lib/validators.js b/blackberry10/node_modules/validator/lib/validators.js
deleted file mode 100644
index e0ae3fe..0000000
--- a/blackberry10/node_modules/validator/lib/validators.js
+++ /dev/null
@@ -1,155 +0,0 @@
-var net = require('net');
-
-// Helper function to avoid duplication of code
-function toDateTime(date) {
-    if (date instanceof Date) {
-        return date;
-    }
-    var intDate = Date.parse(date);
-    if (isNaN(intDate)) {
-        return null;
-    }
-    return new Date(intDate);
-}
-
-// Convert to date without the time component
-function toDate(date) {
-    if (!(date instanceof Date)) {
-        date = toDateTime(date);
-    }
-    if (!date) {
-        return null;
-    }
-    date.setHours(0);
-    date.setMinutes(0);
-    date.setSeconds(0);
-    date.setMilliseconds(0);
-    return date;
-}
-
-var validators = module.exports = {
-    isEmail: function(str) {
-        return str.match(/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/);
-    },
-    isUrl: function(str) {
-        return str.match(/^(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?:\w+:\w+@)?((?:(?:[-\w\d{1-3}]+\.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|edu|co\.uk|ac\.uk|it|fr|tv|museum|asia|local|travel|[a-z]{2}))|((\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)(\.(\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)){3}))(?::[\d]{1,5})?(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?:#(?:[-\w~!$ |\/.,*:;=]|%[a-f\d]{2})*)?$/i) || str.length > 2083;
-    },
-    isIP: function(str) {
-        // net.isIp requires node >= 0.3.0
-        var modernNode = typeof net.isIP === 'function';
-        var method = modernNode? validators.isIPNet : validators.isIPManual;
-        return method(str);
-    },
-    isIPNet: function(str) {
-        return net.isIP(str) !== 0;
-    },
-    isIPManual: function(str) {
-        return str.match(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/);
-    },
-    isAlpha: function(str) {
-        return str.match(/^[a-zA-Z]+$/);
-    },
-    isAlphanumeric: function(str) {
-        return str.match(/^[a-zA-Z0-9]+$/);
-    },
-    isNumeric: function(str) {
-        return str.match(/^-?[0-9]+$/);
-    },
-    isLowercase: function(str) {
-        return str.match(/^[a-z0-9]+$/);
-    },
-    isUppercase: function(str) {
-        return str.match(/^[A-Z0-9]+$/);
-    },
-    isInt: function(str) {
-        return str.match(/^(?:-?(?:[0-9][0-9]*)(?:\.?0+)?)$/);
-    },
-    isDecimal: function(str) {
-        return str !== '' && str.match(/^(?:-?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/);
-    },
-    isDivisibleBy: function(str, n) {
-        return !(parseFloat(str) % n);
-    },
-    notNull: function(str) {
-        return str !== '';
-    },
-    isNull: function(str) {
-        return str === '';
-    },
-    notEmpty: function(str) {
-        return !str.match(/^[\s\t\r\n]*$/);
-    },
-    equals: function(a, b) {
-        return a == b;
-    },
-    contains: function(str, elem) {
-        return str.indexOf(elem) >= 0;
-    },
-    notContains: function(str, elem) {
-        return !validators.contains(str, elem);
-    },
-    regex: function(str, pattern, modifiers) {
-        if (typeof pattern !== 'function') {
-            pattern = new RegExp(pattern, modifiers);
-        }
-        return str.match(pattern);
-    },
-    notRegex: function(str, pattern, modifiers) {
-        return !validators.regex(str, pattern, modifiers);
-    },
-    len: function(str, min, max) {
-        return str.length >= min && (max === undefined || str.length <= max);
-    },
-    //Thanks to github.com/sreuter for the idea.
-    isUUID: function(str, version) {
-        if (version == 3 || version == 'v3') {
-            pattern = /[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
-        } else if (version == 4 || version == 'v4') {
-            pattern = /[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;
-        } else {
-            pattern = /[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
-        }
-        return str.match(pattern);
-    },
-    isDate: function(str) {
-        var intDate = Date.parse(str);
-        return !isNaN(intDate);
-    },
-    isAfter: function(str, date) {
-        date = date || new Date();
-        var origDate = toDate(str);
-        var compDate = toDate(date);
-        return !(origDate && compDate && origDate < compDate);
-    },
-    isBefore: function(str, date) {
-        date = date || new Date();
-        var origDate = toDate(str);
-        var compDate = toDate(date);
-        return !(origDate && compDate && origDate > compDate);
-    },
-    isIn: function(str, options) {
-        var validOptions = options && typeof options.indexOf === 'function';
-        return validOptions && ~options.indexOf(str);
-    },
-    notIn: function(str, options) {
-        var validOptions = options && typeof options.indexOf === 'function';
-        return validOptions && options.indexOf(str) === -1;
-    },
-    min: function(str, val) {
-        var number = parseFloat(str);
-        return isNaN(number) || number >= val;
-    },
-    max: function(str, val) {
-        var number = parseFloat(str);
-        return isNaN(number) || number <= val;
-    },
-    isArray: function(str) {
-        return typeof str === 'object' && Object.prototype.toString.call(str) === '[object Array]';
-    },
-    //Will work against Visa, MasterCard, American Express, Discover, Diners Club, and JCB card numbering formats
-    isCreditCard: function(str) {
-        //remove all dashes, spaces, etc.
-        var sanitized = str.replace(/[^0-9]+/g, '');
-        return sanitized.match(/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/lib/xss.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/lib/xss.js b/blackberry10/node_modules/validator/lib/xss.js
deleted file mode 100755
index 020fa2a..0000000
--- a/blackberry10/node_modules/validator/lib/xss.js
+++ /dev/null
@@ -1,203 +0,0 @@
-//This module is adapted from the CodeIgniter framework
-//The license is available at http://codeigniter.com/
-
-var html_entity_decode = require('./entities').decode;
-
-var never_allowed_str = {
-    'document.cookie':              '[removed]',
-    'document.write':               '[removed]',
-    '.parentNode':                  '[removed]',
-    '.innerHTML':                   '[removed]',
-    'window.location':              '[removed]',
-    '-moz-binding':                 '[removed]',
-    '<!--':                         '&lt;!--',
-    '-->':                          '--&gt;',
-    '<![CDATA[':                    '&lt;![CDATA['
-};
-
-var never_allowed_regex = {
-    'javascript\\s*:':              '[removed]',
-    'expression\\s*(\\(|&\\#40;)':  '[removed]',
-    'vbscript\\s*:':                '[removed]',
-    'Redirect\\s+302':              '[removed]'
-};
-
-var non_displayables = [
-    /%0[0-8bcef]/g,           // url encoded 00-08, 11, 12, 14, 15
-    /%1[0-9a-f]/g,            // url encoded 16-31
-    /[\x00-\x08]/g,           // 00-08
-    /\x0b/g, /\x0c/g,         // 11,12
-    /[\x0e-\x1f]/g            // 14-31
-];
-
-var compact_words = [
-    'javascript', 'expression', 'vbscript',
-    'script', 'applet', 'alert', 'document',
-    'write', 'cookie', 'window'
-];
-
-exports.clean = function(str, is_image) {
-
-    //Recursively clean objects and arrays
-    if (typeof str === 'object') {
-        for (var i in str) {
-            str[i] = exports.clean(str[i]);
-        }
-        return str;
-    }
-
-    //Remove invisible characters
-    str = remove_invisible_characters(str);
-
-    //Protect query string variables in URLs => 901119URL5918AMP18930PROTECT8198
-    str = str.replace(/\&([a-z\_0-9]+)\=([a-z\_0-9]+)/i, xss_hash() + '$1=$2');
-
-    //Validate standard character entities - add a semicolon if missing.  We do this to enable
-    //the conversion of entities to ASCII later.
-    str = str.replace(/(&\#?[0-9a-z]{2,})([\x00-\x20])*;?/i, '$1;$2');
-
-    //Validate UTF16 two byte encoding (x00) - just as above, adds a semicolon if missing.
-    str = str.replace(/(&\#x?)([0-9A-F]+);?/i, '$1;$2');
-
-    //Un-protect query string variables
-    str = str.replace(xss_hash(), '&');
-
-    //Decode just in case stuff like this is submitted:
-    //<a href="http://%77%77%77%2E%67%6F%6F%67%6C%65%2E%63%6F%6D">Google</a>
-    try{  
-      str = decodeURIComponent(str);
-    }
-    catch(error){
-      // str was not actually URI-encoded
-    }
-
-    //Convert character entities to ASCII - this permits our tests below to work reliably.
-    //We only convert entities that are within tags since these are the ones that will pose security problems.
-    str = str.replace(/[a-z]+=([\'\"]).*?\1/gi, function(m, match) {
-        return m.replace(match, convert_attribute(match));
-    });
-
-    //Remove invisible characters again
-    str = remove_invisible_characters(str);
-
-    //Convert tabs to spaces
-    str = str.replace('\t', ' ');
-
-    //Captured the converted string for later comparison
-    var converted_string = str;
-
-    //Remove strings that are never allowed
-    for (var i in never_allowed_str) {
-        str = str.replace(i, never_allowed_str[i]);
-    }
-
-    //Remove regex patterns that are never allowed
-    for (var i in never_allowed_regex) {
-        str = str.replace(new RegExp(i, 'i'), never_allowed_regex[i]);
-    }
-
-    //Compact any exploded words like:  j a v a s c r i p t
-    // We only want to do this when it is followed by a non-word character
-    for (var i in compact_words) {
-        var spacified = compact_words[i].split('').join('\\s*')+'\\s*';
-
-        str = str.replace(new RegExp('('+spacified+')(\\W)', 'ig'), function(m, compat, after) {
-            return compat.replace(/\s+/g, '') + after;
-        });
-    }
-
-    //Remove disallowed Javascript in links or img tags
-    do {
-        var original = str;
-
-        if (str.match(/<a/i)) {
-            str = str.replace(/<a\s+([^>]*?)(>|$)/gi, function(m, attributes, end_tag) {
-                attributes = filter_attributes(attributes.replace('<','').replace('>',''));
-                return m.replace(attributes, attributes.replace(/href=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)/gi, ''));
-            });
-        }
-
-        if (str.match(/<img/i)) {
-            str = str.replace(/<img\s+([^>]*?)(\s?\/?>|$)/gi, function(m, attributes, end_tag) {
-                attributes = filter_attributes(attributes.replace('<','').replace('>',''));
-                return m.replace(attributes, attributes.replace(/src=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)/gi, ''));
-            });
-        }
-
-        if (str.match(/script/i) || str.match(/xss/i)) {
-            str = str.replace(/<(\/*)(script|xss)(.*?)\>/gi, '[removed]');
-        }
-
-    } while(original != str);
-
-    //Remove JavaScript Event Handlers - Note: This code is a little blunt.  It removes the event
-    //handler and anything up to the closing >, but it's unlikely to be a problem.
-    event_handlers = ['[^a-z_\-]on\\w*'];
-
-    //Adobe Photoshop puts XML metadata into JFIF images, including namespacing,
-    //so we have to allow this for images
-    if (!is_image) {
-        event_handlers.push('xmlns');
-    }
-
-    str = str.replace(new RegExp("<([^><]+?)("+event_handlers.join('|')+")(\\s*=\\s*[^><]*)([><]*)", 'i'), '<$1$4');
-
-    //Sanitize naughty HTML elements
-    //If a tag containing any of the words in the list
-    //below is found, the tag gets converted to entities.
-    //So this: <blink>
-    //Becomes: &lt;blink&gt;
-    naughty = 'alert|applet|audio|basefont|base|behavior|bgsound|blink|body|embed|expression|form|frameset|frame|head|html|ilayer|iframe|input|isindex|layer|link|meta|object|plaintext|style|script|textarea|title|video|xml|xss';
-    str = str.replace(new RegExp('<(/*\\s*)('+naughty+')([^><]*)([><]*)', 'gi'), function(m, a, b, c, d) {
-        return '&lt;' + a + b + c + d.replace('>','&gt;').replace('<','&lt;');
-    });
-
-    //Sanitize naughty scripting elements Similar to above, only instead of looking for
-    //tags it looks for PHP and JavaScript commands that are disallowed.  Rather than removing the
-    //code, it simply converts the parenthesis to entities rendering the code un-executable.
-    //For example:    eval('some code')
-    //Becomes:        eval&#40;'some code'&#41;
-    str = str.replace(/(alert|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)/gi, '$1$2&#40;$3&#41;');
-
-    //This adds a bit of extra precaution in case something got through the above filters
-    for (var i in never_allowed_str) {
-        str = str.replace(i, never_allowed_str[i]);
-    }
-    for (var i in never_allowed_regex) {
-        str = str.replace(new RegExp(i, 'i'), never_allowed_regex[i]);
-    }
-
-    //Images are handled in a special way
-    if (is_image && str !== converted_string) {
-        throw new Error('Image may contain XSS');
-    }
-
-    return str;
-}
-
-function remove_invisible_characters(str) {
-    for (var i in non_displayables) {
-        str = str.replace(non_displayables[i], '');
-    }
-    return str;
-}
-
-function xss_hash() {
-    //TODO: Create a random hash
-    return '!*$^#(@*#&';
-}
-
-function convert_attribute(str) {
-    return str.replace('>','&gt;').replace('<','&lt;').replace('\\','\\\\');
-}
-
-//Filter Attributes - filters tag attributes for consistency and safety
-function filter_attributes(str) {
-    out = '';
-
-    str.replace(/\s*[a-z\-]+\s*=\s*(?:\042|\047)(?:[^\1]*?)\1/gi, function(m) {
-        $out += m.replace(/\/\*.*?\*\//g, '');
-    });
-
-    return out;
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/package.json b/blackberry10/node_modules/validator/package.json
deleted file mode 100644
index 71675fe..0000000
--- a/blackberry10/node_modules/validator/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
-  "name": "validator",
-  "description": "Data validation, filtering and sanitization for node.js",
-  "version": "0.4.1",
-  "homepage": "http://github.com/chriso/node-validator",
-  "keywords": [
-    "validator",
-    "validation",
-    "assert",
-    "params",
-    "sanitization",
-    "xss",
-    "entities",
-    "sanitize",
-    "sanitisation",
-    "input"
-  ],
-  "author": {
-    "name": "Chris O'Hara",
-    "email": "cohara87@gmail.com"
-  },
-  "main": "./lib",
-  "directories": {
-    "lib": "./lib"
-  },
-  "bugs": {
-    "url": "http://github.com/chriso/node-validator/issues"
-  },
-  "repository": {
-    "type": "git",
-    "url": "http://github.com/chriso/node-validator.git"
-  },
-  "contributors": [
-    {
-      "name": "PING"
-    },
-    {
-      "name": "Dan VerWeire"
-    },
-    {
-      "name": "Branko Vukelic"
-    },
-    {
-      "name": "Mark Engel"
-    }
-  ],
-  "engines": {
-    "node": ">=0.2.2"
-  },
-  "licenses": [
-    {
-      "type": "MIT",
-      "url": "http://github.com/chriso/node-validator/raw/master/LICENSE"
-    }
-  ],
-  "readme": "**node-validator is a library of string validation, filtering and sanitization methods.**\n\nTo install node-validator, use [npm](http://github.com/isaacs/npm):\n\n```bash\n$ npm install validator\n```\n\nTo use the library in the browser, include `validator-min.js`\n\n## Example\n\n```javascript\nvar check = require('validator').check,\n    sanitize = require('validator').sanitize\n\n//Validate\ncheck('test@email.com').len(6, 64).isEmail();        //Methods are chainable\ncheck('abc').isInt();                                //Throws 'Invalid integer'\ncheck('abc', 'Please enter a number').isInt();       //Throws 'Please enter a number'\ncheck('abcdefghijklmnopzrtsuvqxyz').is(/^[a-z]+$/);\n\n//Sanitize / Filter\nvar int = sanitize('0123').toInt();                  //123\nvar bool = sanitize('true').toBoolean();             //true\nvar str = sanitize(' \\s\\t\\r hello \\n').trim();       //'hello'\nvar str = sanitize('aaaaaaaaab').ltrim('a');         //'b'\nvar str = san
 itize(large_input_str).xss();\nvar str = sanitize('&lt;a&gt;').entityDecode();      //'<a>'\n```\n\n## Web development\n\nOften it's more desirable to check or automatically sanitize parameters by name (rather than the actual string). See [this gist](https://gist.github.com/752126) for instructions on binding the library to the `request` prototype.\n\nIf you are using the [express.js framework](https://github.com/visionmedia/express) you can use the [express-validator middleware](https://github.com/ctavan/express-validator) to seamlessly integrate node-validator.\n\nExample `http://localhost:8080/?zip=12345&foo=1&textarea=large_string`\n\n```javascript\nget('/', function (req, res) {\n    req.onValidationError(function (msg) {\n        //Redirect the user with error 'msg'\n    });\n\n    //Validate user input\n    req.check('zip', 'Please enter a valid ZIP code').len(4,5).isInt();\n    req.check('email', 'Please enter a valid email').len(6,64).isEmail();\n    req.checkHeader('refere
 r').contains('localhost');\n\n    //Sanitize user input\n    req.sanitize('textarea').xss();\n    req.sanitize('foo').toBoolean();\n\n    //etc.\n});\n```\n\n## List of validation methods\n\n```javascript\nis()                            //Alias for regex()\nnot()                           //Alias for notRegex()\nisEmail()\nisUrl()                         //Accepts http, https, ftp\nisIP()\nisAlpha()\nisAlphanumeric()\nisNumeric()\nisInt()                         //isNumeric accepts zero padded numbers, e.g. '001', isInt doesn't\nisLowercase()\nisUppercase()\nisDecimal()\nisFloat()                       //Alias for isDecimal\nnotNull()\nisNull()\nnotEmpty()                      //i.e. not just whitespace\nequals(equals)\ncontains(str)\nnotContains(str)\nregex(pattern, modifiers)       //Usage: regex(/[a-z]/i) or regex('[a-z]','i')\nnotRegex(pattern, modifiers)\nlen(min, max)                   //max is optional\nisUUID(version)                 //Version can be 3 or 4 or empty, see ht
 tp://en.wikipedia.org/wiki/Universally_unique_identifier\nisDate()                        //Uses Date.parse() - regex is probably a better choice\nisAfter(date)                   //Argument is optional and defaults to today\nisBefore(date)                  //Argument is optional and defaults to today\nisIn(options)                   //Accepts an array or string\nnotIn(options)\nmax(val)\nmin(val)\nisArray()\nisCreditCard()                  //Will work against Visa, MasterCard, American Express, Discover, Diners Club, and JCB card numbering formats\n```\n\n## List of sanitization / filter methods\n\n```javascript\ntrim(chars)                     //Trim optional `chars`, default is to trim whitespace (\\r\\n\\t\\s)\nltrim(chars)\nrtrim(chars)\nifNull(replace)\ntoFloat()\ntoInt()\ntoBoolean()                     //True unless str = '0', 'false', or str.length == 0\ntoBooleanStrict()               //False unless str = '1' or 'true'\nentityDecode()                  //Decode HTML entities
 \nentityEncode()\nxss()                           //Remove common XSS attack vectors from text (default)\nxss(true)                       //Remove common XSS attack vectors from images\n```\n\n## Extending the library\n\nWhen adding to the Validator prototype, use `this.str` to access the string and `this.error(this.msg || default_msg)` when the string is invalid\n\n```javascript\nvar Validator = require('validator').Validator;\nValidator.prototype.contains = function(str) {\n    if (!~this.str.indexOf(str)) {\n        this.error(this.msg || this.str + ' does not contain ' + str);\n    }\n    return this; //Allow method chaining\n}\n```\n\nWhen adding to the Filter (sanitize) prototype, use `this.str` to access the string and `this.modify(new_str)` to update it\n\n```javascript\nvar Filter = require('filter').Filter;\nFilter.prototype.removeNumbers = function() {\n    this.modify(this.str.replace(/[0-9]+/g, ''));\n    return this.str;\n}\n```\n\n## Error handling\n\nBy default, the 
 validation methods throw an exception when a check fails\n\n```javascript\ntry {\n    check('abc').notNull().isInt()\n} catch (e) {\n    console.log(e.message); //Invalid integer\n}\n```\n\nTo set a custom error message, set the second param of `check()`\n\n```javascript\ntry {\n    check('abc', 'Please enter a valid integer').notNull().isInt()\n} catch (e) {\n    console.log(e.message); //Please enter a valid integer\n}\n```\n\nTo attach a custom error handler, set the `error` method of the validator instance\n\n```javascript\nvar Validator = require('validator').Validator;\nvar v = new Validator();\nv.error = function(msg) {\n    console.log('Fail');\n}\nv.check('abc').isInt(); //'Fail'\n```\n\nYou might want to collect errors instead of throwing each time\n\n```javascript\nValidator.prototype.error = function (msg) {\n    this._errors.push(msg);\n}\n\nValidator.prototype.getErrors = function () {\n    return this._errors;\n}\n\nvar validator = new Validator();\n\nvalidator.check(
 'abc').isEmail();\nvalidator.check('hello').len(10,30);\n\nvar errors = validator.getErrors(); // ['Invalid email', 'String is too small']\n```\n\n## Contributors\n\n- [PING](https://github.com/PlNG) - Fixed entity encoding\n- [Dan VerWeire](https://github.com/wankdanker) - Modified the behaviour of the error handler\n- [ctavan](https://github.com/ctavan) - Added isArray and isUUID()\n- [foxbunny](https://github.com/foxbunny) - Added min(), max(), isAfter(), isBefore(), and improved isDate()\n- [oris](https://github.com/orls) - Added in()\n- [mren](https://github.com/mren) - Decoupled rules\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2010 Chris O'Hara <cohara87@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or se
 ll copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
-  "readmeFilename": "README.md",
-  "_id": "validator@0.4.1",
-  "_from": "validator@0.4.1"
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/test.js b/blackberry10/node_modules/validator/test.js
deleted file mode 100644
index e290480..0000000
--- a/blackberry10/node_modules/validator/test.js
+++ /dev/null
@@ -1,4 +0,0 @@
-
-var xss = require('./validator').xssClean;
-
-console.log(xss('I <3 this'));

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/test/filter.test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/test/filter.test.js b/blackberry10/node_modules/validator/test/filter.test.js
deleted file mode 100755
index 264c8f4..0000000
--- a/blackberry10/node_modules/validator/test/filter.test.js
+++ /dev/null
@@ -1,145 +0,0 @@
-var node_validator = require('../lib'),
-    Filter = new node_validator.Filter(),
-    assert = require('assert');
-
-module.exports = {
-    'test #ifNull()': function () {
-
-        //Make sure sanitize returns the new string
-        assert.equal(5, Filter.sanitize('').ifNull(5));
-        assert.equal('abc', Filter.sanitize().ifNull('abc'));
-
-        //Modify Filter.modify() to automatically replace a var with the sanitized version
-        var param = '';
-        Filter.modify = function(str) {
-            this.str = str;
-            param = str;
-        }
-        Filter.sanitize(param).ifNull('foobar');
-        assert.equal('foobar', param);
-    },
-
-    'test #toBoolean()': function () {
-        assert.equal(true, Filter.sanitize('1').toBoolean());
-        assert.equal(true, Filter.sanitize('true').toBoolean());
-        assert.equal(true, Filter.sanitize('foobar').toBoolean());
-        assert.equal(true, Filter.sanitize(5).toBoolean());
-        assert.equal(true, Filter.sanitize('   ').toBoolean());
-
-        assert.equal(false, Filter.sanitize('0').toBoolean());
-        assert.equal(false, Filter.sanitize('false').toBoolean());
-        assert.equal(false, Filter.sanitize('').toBoolean());
-        assert.equal(false, Filter.sanitize('false').toBoolean());
-    },
-
-    'test #toBooleanStrict()': function () {
-        assert.equal(true, Filter.sanitize('1').toBooleanStrict());
-        assert.equal(true, Filter.sanitize('true').toBooleanStrict());
-
-        assert.equal(false, Filter.sanitize('foobar').toBooleanStrict());
-        assert.equal(false, Filter.sanitize(5).toBooleanStrict());
-        assert.equal(false, Filter.sanitize('   ').toBooleanStrict());
-        assert.equal(false, Filter.sanitize('0').toBooleanStrict());
-        assert.equal(false, Filter.sanitize('false').toBooleanStrict());
-        assert.equal(false, Filter.sanitize('').toBooleanStrict());
-        assert.equal(false, Filter.sanitize('false').toBooleanStrict());
-    },
-
-    'test #trim()': function () {
-        //Test trim() with spaces
-        assert.equal('abc', Filter.sanitize('  abc').trim());
-        assert.equal('abc', Filter.sanitize('abc  ').trim());
-        assert.equal('abc', Filter.sanitize('   abc  ').trim());
-
-        //Test trim() with \t
-        assert.equal('abc', Filter.sanitize('	abc').trim());
-        assert.equal('abc', Filter.sanitize('abc	').trim());
-        assert.equal('abc', Filter.sanitize('	abc	').trim());
-
-        //Test trim() with a mixture of \t, \s, \r and \n
-        assert.equal('abc', Filter.sanitize('	\r\n  abc\r\n	  ').trim());
-
-        //Test trim() with custom chars
-        assert.equal('2', Filter.sanitize('000020000').trim('0'));
-        assert.equal('202', Filter.sanitize('01000202100101').trim('01'));
-    },
-
-    'test #ltrim()': function () {
-        //Test ltrim() with spaces
-        assert.equal('abc', Filter.sanitize('  abc').ltrim());
-        assert.equal('abc  ', Filter.sanitize('   abc  ').ltrim());
-
-        //Test ltrim() with \t
-        assert.equal('abc', Filter.sanitize('	abc').ltrim());
-        assert.equal('abc	', Filter.sanitize(' abc	').ltrim());
-
-        //Test ltrim() with a mixture of \t, \s, \r and \n
-        assert.equal('abc\r\n', Filter.sanitize('	\r\n  abc\r\n').ltrim());
-
-        //Test ltrim() with custom chars
-        assert.equal('20', Filter.sanitize('000020').ltrim('0'));
-        assert.equal('201', Filter.sanitize('010100201').ltrim('01'));
-    },
-
-    'test #rtrim()': function () {
-        //Test rtrim() with spaces
-        assert.equal('  abc', Filter.sanitize('  abc  ').rtrim());
-        assert.equal('abc', Filter.sanitize('abc  ').rtrim());
-
-        //Test rtrim() with \t
-        assert.equal('	abc', Filter.sanitize('	abc').rtrim());
-        assert.equal('abc', Filter.sanitize('abc	').rtrim());
-
-        //Test rtrim() with a mixture of \t, \s, \r and \n
-        assert.equal('	\r\n  abc', Filter.sanitize('	\r\n  abc\r\n	  ').rtrim());
-
-        //Test rtrim() with custom chars
-        assert.equal('02', Filter.sanitize('02000').rtrim('0'));
-        assert.equal('012', Filter.sanitize('01201001').rtrim('01'));
-    },
-
-    'test #toInt()': function () {
-        assert.ok(3 === Filter.sanitize('3').toInt());
-        assert.ok(3 === Filter.sanitize('   3   ').toInt());
-    },
-
-    'test #toFloat()': function () {
-        assert.ok(3 === Filter.sanitize('3.').toFloat());
-        assert.ok(3 === Filter.sanitize('   3   ').toFloat());
-        assert.ok(0 === Filter.sanitize('.0').toFloat());
-        assert.ok(13.13 === Filter.sanitize('13.13').toFloat());
-    },
-
-    'test #entityDecode()': function () {
-        assert.equal('&', Filter.sanitize('&amp;').entityDecode());
-        assert.equal('&&', Filter.sanitize('&amp;&amp;').entityDecode());
-        assert.equal('""', Filter.sanitize('&quot;&quot;').entityDecode());
-        assert.equal('€', Filter.sanitize('&curren;').entityDecode());
-        assert.equal("'", Filter.sanitize("&#39;").entityDecode());
-        assert.equal("'", Filter.sanitize("&apos;").entityDecode());
-    },
-
-    'test #entityEncode()': function () {
-        assert.equal('&amp;', Filter.sanitize('&').entityEncode());
-        assert.equal('&amp;&amp;', Filter.sanitize('&&').entityEncode());
-        assert.equal('&#39;', Filter.sanitize("'").entityEncode());
-        assert.equal('&quot;&quot;', Filter.sanitize('""').entityEncode());
-        assert.equal('&curren;', Filter.sanitize('€').entityEncode());
-    },
-
-    'test #xss()': function () {
-        //Need more tests!
-        assert.equal('[removed] foobar', Filter.sanitize('javascript  : foobar').xss());
-        assert.equal('[removed] foobar', Filter.sanitize('j a vasc ri pt: foobar').xss());
-    },
-
-    'test chaining': function () {
-        assert.equal('&amp;amp;amp;', Filter.sanitize('&').chain().entityEncode().entityEncode().entityEncode().value());
-
-        //Return the default behaviour
-        Filter.wrap = function (str) {
-            return str;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/test/run.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/test/run.js b/blackberry10/node_modules/validator/test/run.js
deleted file mode 100644
index 8d01d2e..0000000
--- a/blackberry10/node_modules/validator/test/run.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var validatorTests = require('./validator.test.js');
-for (test in validatorTests) {
-  validatorTests[test]();
-}
-var filterTests = require('./filter.test.js');
-for (test in filterTests) {
-  filterTests[test]();
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/test/validator.test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/test/validator.test.js b/blackberry10/node_modules/validator/test/validator.test.js
deleted file mode 100644
index 568a875..0000000
--- a/blackberry10/node_modules/validator/test/validator.test.js
+++ /dev/null
@@ -1,604 +0,0 @@
-var node_validator = require('../lib'),
-    Validator = new node_validator.Validator(),
-    assert = require('assert');
-
-function dateFixture() {
-    var d = new Date();
-    var Y = d.getFullYear();
-    var M = d.getMonth() + 1; // 0-index
-    var D = d.getDate();
-    return {
-        tomorrow: Y + '-' + M + '-' + (D + 1), // YYYY-MM-DD
-        yesterday: Y + '-' + M + '-' + (D - 1) // YYYY-MM-DD
-    };
-}
-
-module.exports = {
-    'test #isEmail()': function () {
-        //Try some invalid emails
-        var invalid = [
-            'invalidemail@',
-            'invalid.com',
-            '@invalid.com'
-        ];
-        invalid.forEach(function(email) {
-            try {
-                Validator.check(email, 'Invalid').isEmail();
-                assert.ok(false, 'Invalid email ('+email+') passed validation');
-            } catch(e) {
-                assert.equal('Invalid', e.message);
-            }
-        });
-
-        //Now try some valid ones
-        var valid = [
-            'foo@bar.com',
-            'x@x.x',
-            'foo@bar.com.au',
-            'foo+bar@bar.com'
-        ];
-        try {
-            valid.forEach(function(email) {
-                Validator.check(email).isEmail();
-            });
-        } catch(e) {
-            assert.ok(false, 'A valid email did not pass validation');
-        }
-    },
-
-    'test #isUrl()': function () {
-        //Try some invalid URLs
-        var invalid = [
-            'xyz://foobar.com', //Only http, https and ftp are valid
-            'invalid/',
-            'invalid.x',
-            'invalid.',
-            '.com',
-            'http://com/',
-            'http://300.0.0.1/'
-        ];
-        invalid.forEach(function(url) {
-            try {
-                Validator.check(url, 'Invalid').isUrl();
-                assert.ok(false, 'Invalid url ('+url+') passed validation');
-            } catch(e) {
-                assert.equal('Invalid', e.message);
-            }
-        });
-
-        //Now try some valid ones
-        var valid = [
-            'foobar.com',
-            'www.foobar.com',
-            'foobar.com/',
-            'valid.au',
-            'http://www.foobar.com/',
-            'https://www.foobar.com/',
-            'ftp://www.foobar.com/',
-            'http://www.foobar.com/~foobar',
-            'http://user:pass@www.foobar.com/',
-            'http://127.0.0.1/',
-            'http://255.255.255.255/',
-            'http://duckduckgo.com/?q=%2F'
-        ];
-        try {
-            valid.forEach(function(url) {
-                Validator.check(url).isUrl();
-            });
-        } catch(e) {
-            assert.ok(false, 'A valid url did not pass validation');
-        }
-    },
-
-    'test #isIP()': function () {
-        //Try some invalid IPs
-        var invalid = [
-            'abc',
-            '256.0.0.0',
-            '0.0.0.256'
-        ];
-        invalid.forEach(function(ip) {
-            try {
-                Validator.check(ip, 'Invalid').isIP();
-                assert.ok(false, 'Invalid IP ('+ip+') passed validation');
-            } catch(e) {
-                assert.equal('Invalid', e.message);
-            }
-        });
-
-        //Now try some valid ones
-        var valid = [
-            '127.0.0.1',
-            '0.0.0.0',
-            '255.255.255.255',
-            '1.2.3.4'
-        ];
-        try {
-            valid.forEach(function(ip) {
-                Validator.check(ip).isIP();
-            });
-        } catch(e) {
-            assert.ok(false, 'A valid IP did not pass validation');
-        }
-    },
-
-    'test #isAlpha()': function () {
-        assert.ok(Validator.check('abc').isAlpha());
-        assert.ok(Validator.check('ABC').isAlpha());
-        assert.ok(Validator.check('FoObAr').isAlpha());
-
-        ['123',123,'abc123','  ',''].forEach(function(str) {
-            try {
-                Validator.check(str).isAlpha();
-                assert.ok(false, 'isAlpha failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #isAlphanumeric()': function () {
-        assert.ok(Validator.check('abc13').isAlphanumeric());
-        assert.ok(Validator.check('123').isAlphanumeric());
-        assert.ok(Validator.check('F1oO3bAr').isAlphanumeric());
-
-        ['(*&ASD','  ','.',''].forEach(function(str) {
-            try {
-                Validator.check(str).isAlphanumeric();
-                assert.ok(false, 'isAlphanumeric failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #isNumeric()': function () {
-        assert.ok(Validator.check('123').isNumeric());
-        assert.ok(Validator.check('00123').isNumeric());
-        assert.ok(Validator.check('-00123').isNumeric());
-        assert.ok(Validator.check('0').isNumeric());
-        assert.ok(Validator.check('-0').isNumeric());
-
-        ['123.123','  ','.',''].forEach(function(str) {
-            try {
-                Validator.check(str).isNumeric();
-                assert.ok(false, 'isNumeric failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #isLowercase()': function () {
-        assert.ok(Validator.check('abc').isLowercase());
-        assert.ok(Validator.check('foobar').isLowercase());
-        assert.ok(Validator.check('a').isLowercase());
-        assert.ok(Validator.check('123').isLowercase());
-        assert.ok(Validator.check('abc123').isLowercase());
-
-        ['123A','ABC','.',''].forEach(function(str) {
-            try {
-                Validator.check(str).isLowercase();
-                assert.ok(false, 'isLowercase failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #isUppercase()': function () {
-        assert.ok(Validator.check('FOOBAR').isUppercase());
-        assert.ok(Validator.check('A').isUppercase());
-        assert.ok(Validator.check('123').isUppercase());
-        assert.ok(Validator.check('ABC123').isUppercase());
-
-        ['abc','123aBC','.',''].forEach(function(str) {
-            try {
-                Validator.check(str).isUppercase();
-                assert.ok(false, 'isUpper failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #isInt()': function () {
-        assert.ok(Validator.check('13').isInt());
-        assert.ok(Validator.check('123').isInt());
-        assert.ok(Validator.check('0').isInt());
-        assert.ok(Validator.check(0).isInt());
-        assert.ok(Validator.check(123).isInt());
-        assert.ok(Validator.check('-0').isInt());
-        assert.ok(Validator.check('01').isInt());
-        assert.ok(Validator.check('-01').isInt());
-        assert.ok(Validator.check('000').isInt());
-
-        ['123.123','  ',''].forEach(function(str) {
-            try {
-                Validator.check(str).isInt();
-                assert.ok(false, 'falsepositive');
-            } catch (e) {
-              if (e.message == 'falsepositive') {
-                e.message = 'isInt had a false positive: ' + str;
-                throw e;
-              }
-            }
-        });
-    },
-
-    'test #isDecimal()': function () {
-        assert.ok(Validator.check('123').isDecimal());
-        assert.ok(Validator.check('123.').isDecimal());
-        assert.ok(Validator.check('123.123').isDecimal());
-        assert.ok(Validator.check('-123.123').isDecimal());
-        assert.ok(Validator.check('0.123').isDecimal());
-        assert.ok(Validator.check('.123').isDecimal());
-        assert.ok(Validator.check('.0').isDecimal());
-        assert.ok(Validator.check('0').isDecimal());
-        assert.ok(Validator.check('-0').isDecimal());
-        assert.ok(Validator.check('01.123').isDecimal());
-
-        assert.ok(Validator.check('2.2250738585072011e-308').isDecimal());
-        assert.ok(Validator.check('-0.22250738585072011e-307').isDecimal());
-        assert.ok(Validator.check('-0.22250738585072011E-307').isDecimal());
-
-        ['-.123','  ',''].forEach(function(str) {
-            try {
-                Validator.check(str).isDecimal();
-                assert.ok(false, 'falsepositive');
-            } catch (e) {
-              if (e.message == 'falsepositive') {
-                e.message = 'isDecimal had a false positive: ' + str;
-                throw e;
-              }
-            }
-        });
-    },
-
-    //Alias for isDecimal()
-    'test #isFloat()': function () {
-        assert.ok(Validator.check('0.5').isFloat());
-    },
-
-    'test #isNull()': function () {
-        assert.ok(Validator.check('').isNull());
-        assert.ok(Validator.check().isNull());
-
-        ['  ','123','abc'].forEach(function(str) {
-            try {
-                Validator.check(str).isNull();
-                assert.ok(false, 'isNull failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #notNull()': function () {
-        assert.ok(Validator.check('abc').notNull());
-        assert.ok(Validator.check('123').notNull());
-        assert.ok(Validator.check('   ').notNull());
-
-        [false,''].forEach(function(str) {
-            try {
-                Validator.check(str).notNull();
-                assert.ok(false, 'notNull failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #notEmpty()': function () {
-        assert.ok(Validator.check('abc').notEmpty());
-        assert.ok(Validator.check('123').notEmpty());
-        assert.ok(Validator.check('   123   ').notEmpty());
-
-        [false,'  ','\r\n','	','', NaN].forEach(function(str) {
-            try {
-                Validator.check(str).notEmpty();
-                assert.ok(false, 'notEmpty failed');
-            } catch (e) {}
-        });
-    },
-
-    'test #equals()': function () {
-        assert.ok(Validator.check('abc').equals('abc'));
-        assert.ok(Validator.check('123').equals(123));
-        assert.ok(Validator.check('   ').equals('   '));
-        assert.ok(Validator.check().equals(''));
-
-        try {
-            Validator.check(123).equals('abc');
-            assert.ok(false, 'equals failed');
-        } catch (e) {}
-
-        try {
-            Validator.check('').equals('   ');
-            assert.ok(false, 'equals failed');
-        } catch (e) {}
-    },
-
-    'test #contains()': function () {
-        assert.ok(Validator.check('abc').contains('abc'));
-        assert.ok(Validator.check('foobar').contains('oo'));
-        assert.ok(Validator.check('abc').contains('a'));
-        assert.ok(Validator.check('  ').contains(' '));
-        assert.ok(Validator.check('abc').contains(''));
-
-        try {
-            Validator.check(123).contains('abc');
-            assert.ok(false, 'contains failed');
-        } catch (e) {}
-
-        try {
-            Validator.check('\t').contains('\t\t');
-            assert.ok(false, 'contains failed');
-        } catch (e) {}
-    },
-
-    'test #notContains()': function () {
-        assert.ok(Validator.check('abc').notContains('a '));
-        assert.ok(Validator.check('foobar').notContains('foobars'));
-        assert.ok(Validator.check('abc').notContains('123'));
-
-        try {
-            Validator.check(123).notContains(1);
-            assert.ok(false, 'notContains failed');
-        } catch (e) {}
-
-        try {
-            Validator.check(' ').contains('');
-            assert.ok(false, 'notContains failed');
-        } catch (e) {}
-    },
-
-    'test #regex()': function () {
-        assert.ok(Validator.check('abc').regex(/a/));
-        assert.ok(Validator.check('abc').regex(/^abc$/));
-        assert.ok(Validator.check('abc').regex('abc'));
-        assert.ok(Validator.check('ABC').regex(/^abc$/i));
-        assert.ok(Validator.check('ABC').regex('abc', 'i'));
-        assert.ok(Validator.check(12390947686129).regex(/^[0-9]+$/));
-
-        //Check the is() alias
-        assert.ok(Validator.check(12390947686129).is(/^[0-9]+$/));
-
-        try {
-            Validator.check(123).regex(/^1234$/);
-            assert.ok(false, 'regex failed');
-        } catch (e) {}
-    },
-
-    'test #notRegex()': function () {
-        assert.ok(Validator.check('foobar').notRegex(/e/));
-        assert.ok(Validator.check('ABC').notRegex('abc'));
-        assert.ok(Validator.check(12390947686129).notRegex(/a/));
-
-        //Check the not() alias
-        assert.ok(Validator.check(12390947686129).not(/^[a-z]+$/));
-
-        try {
-            Validator.check(123).notRegex(/123/);
-            assert.ok(false, 'regex failed');
-        } catch (e) {}
-    },
-
-    'test #len()': function () {
-        assert.ok(Validator.check('a').len(1));
-        assert.ok(Validator.check(123).len(2));
-        assert.ok(Validator.check(123).len(2, 4));
-        assert.ok(Validator.check(12).len(2,2));
-        assert.ok(Validator.check([1, 2]).len(2,2));
-        assert.ok(Validator.check([1, 2, 3]).len(2,4));
-
-        try {
-            Validator.check('abc').len(4);
-            assert.ok(false, 'len failed');
-        } catch (e) {}
-        try {
-            Validator.check('abcd').len(1, 3);
-            assert.ok(false, 'len failed');
-        } catch (e) {}
-    },
-
-    'test #isUUID()': function () {
-        ////xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-
-        assert.ok(Validator.check('A987FBC9-4BED-3078-CF07-9141BA07C9F3').isUUID());
-        assert.ok(Validator.check('A987FBC9-4BED-3078-CF07-9141BA07C9F3').isUUID(1));
-        assert.ok(Validator.check('A987FBC9-4BED-3078-CF07-9141BA07C9F3').isUUID(2));
-        assert.ok(Validator.check('A987FBC9-4BED-3078-CF07-9141BA07C9F3').isUUID(3));
-        assert.ok(Validator.check('A987FBC9-4BED-4078-8F07-9141BA07C9F3').isUUID(4));
-
-        try {
-            Validator.check('A987FBC9-4BED-3078-CF07-9141BA07C9F3').isUUID(4);
-            assert.ok(false, 'isUUID failed');
-        } catch (e) {}
-
-        try {
-            Validator.check('A987FBC9-4BED-4078-0F07-9141BA07C9F3').isUUID(4);
-            assert.ok(false, 'isUUID failed');
-        } catch (e) {}
-
-        try {
-            Validator.check('abc').isUUID();
-            assert.ok(false, 'isUUID failed');
-        } catch (e) {}
-
-        try {
-            Validator.check('A987FBC932-4BED-3078-CF07-9141BA07C9').isUUID();
-            assert.ok(false, 'isUUID failed');
-        } catch (e) {}
-
-        try {
-            Validator.check('A987FBG9-4BED-3078-CF07-9141BA07C9DE').isUUID();
-            assert.ok(false, 'isUUID failed');
-        } catch (e) {}
-
-    },
-
-    'test #isIn(options)': function () {
-
-        assert.ok(Validator.check('foo').isIn('foobar'));
-        assert.ok(Validator.check('foo').isIn('I love football'));
-
-        assert.ok(Validator.check('foo').isIn(['foo', 'bar', 'baz']));
-
-        assert.throws(function() {
-            Validator.check('foo').isIn(['bar', 'baz']);
-          }, /unexpected/i
-        );
-
-        assert.throws(function() {
-            Validator.check('foo').isIn('bar, baz');
-          }, /unexpected/i
-        );
-
-        assert.throws(function() {
-            Validator.check('foo').isIn(1234567);
-          }, /invalid/i
-        );
-
-        assert.throws(function() {
-            Validator.check('foo').isIn({foo:"foo",bar:"bar"});
-          }, /invalid/i
-        );
-    },
-
-    'test #notIn(options)': function () {
-
-        assert.ok(Validator.check('foo').notIn('bar'));
-        assert.ok(Validator.check('foo').notIn('awesome'));
-
-        assert.ok(Validator.check('foo').notIn(['foobar', 'bar', 'baz']));
-
-        assert.throws(function() {
-            Validator.check('foo').notIn(['foo', 'bar', 'baz']);
-          }, /unexpected/i
-        );
-
-        assert.throws(function() {
-            Validator.check('foo').notIn('foobar');
-          }, /unexpected/i
-        );
-
-        assert.throws(function() {
-            Validator.check('foo').notIn(1234567);
-          }, /invalid/i
-        );
-
-        assert.throws(function() {
-            Validator.check('foo').notIn({foo:"foo",bar:"bar"});
-          }, /invalid/i
-        );
-    },
-    
-    'test #isDate()': function() {
-        assert.ok(Validator.check('2011-08-04').isDate());
-        assert.ok(Validator.check('04. 08. 2011.').isDate());
-        assert.ok(Validator.check('08/04/2011').isDate());
-        assert.ok(Validator.check('2011.08.04').isDate());
-        assert.ok(Validator.check('4. 8. 2011. GMT').isDate());
-        assert.ok(Validator.check('2011-08-04 12:00').isDate());
-
-        assert.throws(Validator.check('foo').isDate);
-        assert.throws(Validator.check('2011-foo-04').isDate);
-        assert.throws(Validator.check('GMT').isDate);
-    },
-
-    'test #min()': function() {
-        assert.ok(Validator.check('4').min(2));
-        assert.ok(Validator.check('5').min(5));
-        assert.ok(Validator.check('3.2').min(3));
-        assert.ok(Validator.check('4.2').min(4.2));
-
-        assert.throws(function() {
-            Validator.check('5').min(10);
-        });
-        assert.throws(function() {
-            Validator.check('5.1').min(5.11);
-        });
-    },
-
-    'test #max()': function() {
-        assert.ok(Validator.check('4').max(5));
-        assert.ok(Validator.check('7').max(7));
-        assert.ok(Validator.check('6.3').max(7));
-        assert.ok(Validator.check('2.9').max(2.9));
-
-        assert.throws(function() {
-            Validator.check('5').max(2);
-        });
-        assert.throws(function() {
-            Validator.check('4.9').max(4.2);
-        });
-    },
-
-    'test #isArray()': function () {
-        assert.ok(Validator.check(new Array()).isArray());
-        assert.ok(Validator.check([]).isArray());
-        assert.ok(Validator.check([1, 2]).isArray());
-        assert.ok(Validator.check(['a', 'b', 'c']).isArray());
-        assert.ok(Validator.check([{}, {}]).isArray());
-
-        try {
-            assert.ok(Validator.check('a').isArray());
-            assert.ok(false, 'len failed');
-        } catch (e) {}
-        try {
-            assert.ok(Validator.check({}).isArray());
-            assert.ok(false, 'len failed');
-        } catch (e) {}
-        try {
-            assert.ok(Validator.check({a: 1, b: 2}).isArray());
-            assert.ok(false, 'len failed');
-        } catch (e) {}
-        try {
-            assert.ok(Validator.check(new Object()).isArray());
-            assert.ok(false, 'len failed');
-        } catch (e) {}
-    },
-
-    'test #isDate()': function() {
-        assert.ok(Validator.check('2011-08-04').isDate());
-        assert.ok(Validator.check('04. 08. 2011.').isDate());
-        assert.ok(Validator.check('08/04/2011').isDate());
-        assert.ok(Validator.check('2011.08.04').isDate());
-        assert.ok(Validator.check('4. 8. 2011. GMT').isDate());
-        assert.ok(Validator.check('2011-08-04 12:00').isDate());
-
-        assert.throws(Validator.check('foo').isDate);
-        assert.throws(Validator.check('2011-foo-04').isDate);
-        assert.throws(Validator.check('GMT').isDate);
-    },
-
-    'test #isAfter()': function() {
-        var f = dateFixture();
-
-        assert.ok(Validator.check('2011-08-04').isAfter('2011-08-03'));
-        assert.ok(Validator.check('08. 04. 2011.').isAfter(new Date('2011-08-04')));
-        assert.ok(Validator.check(f.tomorrow).isAfter());
-        
-        assert.throws(function() {
-            Validator.check('08/04/2011').isAfter('2011-09-01');
-        });
-        assert.throws(function() {
-            Validator.check(f.yesterday).isAfter();
-        });
-    },
-
-    'test #isBefore()': function() {
-        var f = dateFixture();
-
-        assert.ok(Validator.check('2011-08-04').isBefore('2011-08-06'));
-        assert.ok(Validator.check('08. 04. 2011.').isBefore(new Date('2011-08-04')));
-        assert.ok(Validator.check(f.yesterday).isBefore());
-        
-        assert.throws(function() {
-            Validator.check('08/04/2011').isBefore('2011-07-01');
-        });
-        assert.throws(function() {
-            Validator.check(f.tomorrow).isBefore();
-        });
-    },
-
-    'test #isDivisibleBy()': function() {
-        assert.ok(Validator.check('10').isDivisibleBy(2));
-        assert.ok(Validator.check('6').isDivisibleBy(3));
-        
-        assert.throws(function() {
-            Validator.check('5').isDivisibleBy(2);
-        });
-
-        assert.throws(function() {
-            Validator.check('6.7').isDivisibleBy(3);
-        });
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/a6733a83/blackberry10/node_modules/validator/validator-min.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/validator/validator-min.js b/blackberry10/node_modules/validator/validator-min.js
deleted file mode 100644
index acc1d3c..0000000
--- a/blackberry10/node_modules/validator/validator-min.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*!
- * Copyright (c) 2010 Chris O'Hara <cohara87@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */(function(a){function i(a){for(var b in g)a=a.replace(g[b],"");return a}function j(){return"!*$^#(@*#&"}function k(a){return a.replace(">","&gt;").replace("<","&lt;").replace("\\","\\\\")}function l(a){return out="",a.replace(/\s*[a-z\-]+\s*=\s*(?:\042|\047)(?:[^\1]*?)\1/gi,function(a){out+=a.replace(/\/\*.*?\*\//g,"")}),out}var b={"&nbsp;":"\u00a0","&iexcl;":"\u00a1","&cent;":"\u00a2","&pound;":"\u00a3","&curren;":"\u20ac","&yen;":"\u00a5","&brvbar;":"\u0160","&sect;":"\u00a7","&uml;":"\u0161","&copy;":"\u00a9","&ordf;":"\u00aa","&laquo;":"\u00ab","&not;":"\u00ac","&shy;":"\u00ad","&reg;":"\u00ae","&macr;":"\u00af","&deg;":"\u00b0","&plusmn;":"\u00b1","&sup2;":"\u00b2","&sup3;":"\u00b3","&acute;":"\u017d","&micro;":"\u00b5","&para;":"\u00b6","&middot;":"\u00b7","&cedil;":"\u017e","&sup1;":"\u00b9","&ordm;":"\u00ba","&raquo;":"\u00bb","&frac14;":"\u0152","&frac12;":"\u0153","&frac34;":"\u0178","&iquest;":"\u00bf","&Agrave;":"\u00c0","&Aacute;":"\u00c1","&Acirc;":"\u00c2","&Atilde
 ;":"\u00c3","&Auml;":"\u00c4","&Aring;":"\u00c5","&AElig;":"\u00c6","&Ccedil;":"\u00c7","&Egrave;":"\u00c8","&Eacute;":"\u00c9","&Ecirc;":"\u00ca","&Euml;":"\u00cb","&Igrave;":"\u00cc","&Iacute;":"\u00cd","&Icirc;":"\u00ce","&Iuml;":"\u00cf","&ETH;":"\u00d0","&Ntilde;":"\u00d1","&Ograve;":"\u00d2","&Oacute;":"\u00d3","&Ocirc;":"\u00d4","&Otilde;":"\u00d5","&Ouml;":"\u00d6","&times;":"\u00d7","&Oslash;":"\u00d8","&Ugrave;":"\u00d9","&Uacute;":"\u00da","&Ucirc;":"\u00db","&Uuml;":"\u00dc","&Yacute;":"\u00dd","&THORN;":"\u00de","&szlig;":"\u00df","&agrave;":"\u00e0","&aacute;":"\u00e1","&acirc;":"\u00e2","&atilde;":"\u00e3","&auml;":"\u00e4","&aring;":"\u00e5","&aelig;":"\u00e6","&ccedil;":"\u00e7","&egrave;":"\u00e8","&eacute;":"\u00e9","&ecirc;":"\u00ea","&euml;":"\u00eb","&igrave;":"\u00ec","&iacute;":"\u00ed","&icirc;":"\u00ee","&iuml;":"\u00ef","&eth;":"\u00f0","&ntilde;":"\u00f1","&ograve;":"\u00f2","&oacute;":"\u00f3","&ocirc;":"\u00f4","&otilde;":"\u00f5","&ouml;":"\u00f6","&di
 vide;":"\u00f7","&oslash;":"\u00f8","&ugrave;":"\u00f9","&uacute;":"\u00fa","&ucirc;":"\u00fb","&uuml;":"\u00fc","&yacute;":"\u00fd","&thorn;":"\u00fe","&yuml;":"\u00ff","&quot;":'"',"&lt;":"<","&gt;":">","&apos;":"'","&minus;":"\u2212","&circ;":"\u02c6","&tilde;":"\u02dc","&Scaron;":"\u0160","&lsaquo;":"\u2039","&OElig;":"\u0152","&lsquo;":"\u2018","&rsquo;":"\u2019","&ldquo;":"\u201c","&rdquo;":"\u201d","&bull;":"\u2022","&ndash;":"\u2013","&mdash;":"\u2014","&trade;":"\u2122","&scaron;":"\u0161","&rsaquo;":"\u203a","&oelig;":"\u0153","&Yuml;":"\u0178","&fnof;":"\u0192","&Alpha;":"\u0391","&Beta;":"\u0392","&Gamma;":"\u0393","&Delta;":"\u0394","&Epsilon;":"\u0395","&Zeta;":"\u0396","&Eta;":"\u0397","&Theta;":"\u0398","&Iota;":"\u0399","&Kappa;":"\u039a","&Lambda;":"\u039b","&Mu;":"\u039c","&Nu;":"\u039d","&Xi;":"\u039e","&Omicron;":"\u039f","&Pi;":"\u03a0","&Rho;":"\u03a1","&Sigma;":"\u03a3","&Tau;":"\u03a4","&Upsilon;":"\u03a5","&Phi;":"\u03a6","&Chi;":"\u03a7","&Psi;":"\u03a8","
 &Omega;":"\u03a9","&alpha;":"\u03b1","&beta;":"\u03b2","&gamma;":"\u03b3","&delta;":"\u03b4","&epsilon;":"\u03b5","&zeta;":"\u03b6","&eta;":"\u03b7","&theta;":"\u03b8","&iota;":"\u03b9","&kappa;":"\u03ba","&lambda;":"\u03bb","&mu;":"\u03bc","&nu;":"\u03bd","&xi;":"\u03be","&omicron;":"\u03bf","&pi;":"\u03c0","&rho;":"\u03c1","&sigmaf;":"\u03c2","&sigma;":"\u03c3","&tau;":"\u03c4","&upsilon;":"\u03c5","&phi;":"\u03c6","&chi;":"\u03c7","&psi;":"\u03c8","&omega;":"\u03c9","&thetasym;":"\u03d1","&upsih;":"\u03d2","&piv;":"\u03d6","&ensp;":"\u2002","&emsp;":"\u2003","&thinsp;":"\u2009","&zwnj;":"\u200c","&zwj;":"\u200d","&lrm;":"\u200e","&rlm;":"\u200f","&sbquo;":"\u201a","&bdquo;":"\u201e","&dagger;":"\u2020","&Dagger;":"\u2021","&hellip;":"\u2026","&permil;":"\u2030","&prime;":"\u2032","&Prime;":"\u2033","&oline;":"\u203e","&frasl;":"\u2044","&euro;":"\u20ac","&image;":"\u2111","&weierp;":"\u2118","&real;":"\u211c","&alefsym;":"\u2135","&larr;":"\u2190","&uarr;":"\u2191","&rarr;":"\u21
 92","&darr;":"\u2193","&harr;":"\u2194","&crarr;":"\u21b5","&lArr;":"\u21d0","&uArr;":"\u21d1","&rArr;":"\u21d2","&dArr;":"\u21d3","&hArr;":"\u21d4","&forall;":"\u2200","&part;":"\u2202","&exist;":"\u2203","&empty;":"\u2205","&nabla;":"\u2207","&isin;":"\u2208","&notin;":"\u2209","&ni;":"\u220b","&prod;":"\u220f","&sum;":"\u2211","&lowast;":"\u2217","&radic;":"\u221a","&prop;":"\u221d","&infin;":"\u221e","&ang;":"\u2220","&and;":"\u2227","&or;":"\u2228","&cap;":"\u2229","&cup;":"\u222a","&int;":"\u222b","&there4;":"\u2234","&sim;":"\u223c","&cong;":"\u2245","&asymp;":"\u2248","&ne;":"\u2260","&equiv;":"\u2261","&le;":"\u2264","&ge;":"\u2265","&sub;":"\u2282","&sup;":"\u2283","&nsub;":"\u2284","&sube;":"\u2286","&supe;":"\u2287","&oplus;":"\u2295","&otimes;":"\u2297","&perp;":"\u22a5","&sdot;":"\u22c5","&lceil;":"\u2308","&rceil;":"\u2309","&lfloor;":"\u230a","&rfloor;":"\u230b","&lang;":"\u2329","&rang;":"\u232a","&loz;":"\u25ca","&spades;":"\u2660","&clubs;":"\u2663","&hearts;":"\u
 2665","&diams;":"\u2666"},c=function(a){if(!~a.indexOf("&"))return a;for(var c in b)a=a.replace(new RegExp(c,"g"),b[c]);return a=a.replace(/&#x(0*[0-9a-f]{2,5});?/gi,function(a,b){return String.fromCharCode(parseInt(+b,16))}),a=a.replace(/&#([0-9]{2,4});?/gi,function(a,b){return String.fromCharCode(+b)}),a=a.replace(/&amp;/g,"&"),a},d=function(a){a=a.replace(/&/g,"&amp;"),a=a.replace(/'/g,"&#39;");for(var c in b)a=a.replace(new RegExp(b[c],"g"),c);return a};a.entities={encode:d,decode:c};var e={"document.cookie":"[removed]","document.write":"[removed]",".parentNode":"[removed]",".innerHTML":"[removed]","window.location":"[removed]","-moz-binding":"[removed]","<!--":"&lt;!--","-->":"--&gt;","<![CDATA[":"&lt;![CDATA["},f={"javascript\\s*:":"[removed]","expression\\s*(\\(|&\\#40;)":"[removed]","vbscript\\s*:":"[removed]","Redirect\\s+302":"[removed]"},g=[/%0[0-8bcef]/g,/%1[0-9a-f]/g,/[\x00-\x08]/g,/\x0b/g,/\x0c/g,/[\x0e-\x1f]/g],h=["javascript","expression","vbscript","script","applet"
 ,"alert","document","write","cookie","window"];a.xssClean=function(b,c){if(typeof b=="object"){for(var d in b)b[d]=a.xssClean(b[d]);return b}b=i(b),b=b.replace(/\&([a-z\_0-9]+)\=([a-z\_0-9]+)/i,j()+"$1=$2"),b=b.replace(/(&\#?[0-9a-z]{2,})([\x00-\x20])*;?/i,"$1;$2"),b=b.replace(/(&\#x?)([0-9A-F]+);?/i,"$1;$2"),b=b.replace(j(),"&");try{b=decodeURIComponent(b)}catch(g){}b=b.replace(/[a-z]+=([\'\"]).*?\1/gi,function(a,b){return a.replace(b,k(b))}),b=i(b),b=b.replace("\t"," ");var m=b;for(var d in e)b=b.replace(d,e[d]);for(var d in f)b=b.replace(new RegExp(d,"i"),f[d]);for(var d in h){var n=h[d].split("").join("\\s*")+"\\s*";b=b.replace(new RegExp("("+n+")(\\W)","ig"),function(a,b,c){return b.replace(/\s+/g,"")+c})}do{var o=b;b.match(/<a/i)&&(b=b.replace(/<a\s+([^>]*?)(>|$)/gi,function(a,b,c){return b=l(b.replace("<","").replace(">","")),a.replace(b,b.replace(/href=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)/gi,""))})),b.match(/<im
 g/i)&&(b=b.replace(/<img\s+([^>]*?)(\s?\/?>|$)/gi,function(a,b,c){return b=l(b.replace("<","").replace(">","")),a.replace(b,b.replace(/src=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)/gi,""))}));if(b.match(/script/i)||b.match(/xss/i))b=b.replace(/<(\/*)(script|xss)(.*?)\>/gi,"[removed]")}while(o!=b);event_handlers=["[^a-z_-]on\\w*"],c||event_handlers.push("xmlns"),b=b.replace(new RegExp("<([^><]+?)("+event_handlers.join("|")+")(\\s*=\\s*[^><]*)([><]*)","i"),"<$1$4"),naughty="alert|applet|audio|basefont|base|behavior|bgsound|blink|body|embed|expression|form|frameset|frame|head|html|ilayer|iframe|input|isindex|layer|link|meta|object|plaintext|style|script|textarea|title|video|xml|xss",b=b.replace(new RegExp("<(/*\\s*)("+naughty+")([^><]*)([><]*)","gi"),function(a,b,c,d,e){return"&lt;"+b+c+d+e.replace(">","&gt;").replace("<","&lt;")}),b=b.replace(/(alert|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_conten
 ts|readfile|unlink)(\s*)\((.*?)\)/gi,"$1$2&#40;$3&#41;");for(var d in e)b=b.replace(d,e[d]);for(var d in f)b=b.replace(new RegExp(d,"i"),f[d]);if(c&&b!==m)throw new Error("Image may contain XSS");return b};var m=a.Validator=function(){};m.prototype.check=function(a,b){return this.str=a==null||isNaN(a)&&a.length==undefined?"":a+"",this.msg=b,this._errors=[],this},m.prototype.validate=m.prototype.check,m.prototype.assert=m.prototype.check,m.prototype.error=function(a){throw new Error(a)},m.prototype.isEmail=function(){return this.str.match(/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/)?this:this.error(this.msg||"Invalid email")},m.prototype.isCreditCard=function(){return this.str=this.str.replace(/[^0-9]+/g,""),this.str.match(/^(?:4[0-9]{
 12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/)?this:this.error(this.msg||"Invalid credit card")},m.prototype.isUrl=function(){return!this.str.match(/^(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?:\w+:\w+@)?((?:(?:[-\w\d{1-3}]+\.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|edu|co\.uk|ac\.uk|it|fr|tv|museum|asia|local|travel|[a-z]{2}))|((\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)(\.(\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)){3}))(?::[\d]{1,5})?(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?:#(?:[-\w~!$ |\/.,*:;=]|%[a-f\d]{2})*)?$/i)||this.str.length>2083?this.error(this.msg||"Invalid URL"):this},m.prototype.isIP=function(){return this.str.match(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|
 [01]?[0-9][0-9]?)$/)?this:this.error(this.msg||"Invalid IP")},m.prototype.isAlpha=function(){return this.str.match(/^[a-zA-Z]+$/)?this:this.error(this.msg||"Invalid characters")},m.prototype.isAlphanumeric=function(){return this.str.match(/^[a-zA-Z0-9]+$/)?this:this.error(this.msg||"Invalid characters")},m.prototype.isNumeric=function(){return this.str.match(/^-?[0-9]+$/)?this:this.error(this.msg||"Invalid number")},m.prototype.isLowercase=function(){return this.str.match(/^[a-z0-9]+$/)?this:this.error(this.msg||"Invalid characters")},m.prototype.isUppercase=function(){return this.str.match(/^[A-Z0-9]+$/)?this:this.error(this.msg||"Invalid characters")},m.prototype.isInt=function(){return this.str.match(/^(?:-?(?:0|[1-9][0-9]*))$/)?this:this.error(this.msg||"Invalid integer")},m.prototype.isDecimal=function(){return this.str.match(/^(?:-?(?:0|[1-9][0-9]*))?(?:\.[0-9]*)?$/)?this:this.error(this.msg||"Invalid decimal")},m.prototype.isFloat=function(){return this.isDecimal()},m.prototy
 pe.notNull=function(){return this.str===""?this.error(this.msg||"Invalid characters"):this},m.prototype.isNull=function(){return this.str!==""?this.error(this.msg||"Invalid characters"):this},m.prototype.notEmpty=function(){return this.str.match(/^[\s\t\r\n]*$/)?this.error(this.msg||"String is whitespace"):this},m.prototype.equals=function(a){return this.str!=a?this.error(this.msg||"Not equal"):this},m.prototype.contains=function(a){return this.str.indexOf(a)===-1?this.error(this.msg||"Invalid characters"):this},m.prototype.notContains=function(a){return this.str.indexOf(a)>=0?this.error(this.msg||"Invalid characters"):this},m.prototype.regex=m.prototype.is=function(a,b){return typeof a!="function"&&(a=new RegExp(a,b)),this.str.match(a)?this:this.error(this.msg||"Invalid characters")},m.prototype.notRegex=m.prototype.not=function(a,b){return typeof a!="function"&&(a=new RegExp(a,b)),this.str.match(a)&&this.error(this.msg||"Invalid characters"),this},m.prototype.len=function(a,b){ret
 urn this.str.length<a&&this.error(this.msg||"String is too small"),typeof b!==undefined&&this.str.length>b?this.error(this.msg||"String is too large"):this},m.prototype.isUUID=function(a){return a==3||a=="v3"?pattern=/[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i:a==4||a=="v4"?pattern=/[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i:pattern=/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,this.str.match(pattern)?this:this.error(this.msg||"Not a UUID")},m.prototype.isDate=function(){var a=Date.parse(this.str);return isNaN(a)?this.error(this.msg||"Not a date"):this},m.prototype.isIn=function(a){return a&&typeof a.indexOf=="function"?~a.indexOf(this.str)?this:this.error(this.msg||"Unexpected value"):this.error(this.msg||"Invalid in() argument")},m.prototype.notIn=function(a){return a&&typeof a.indexOf=="function"?a.indexOf(this.str)!==-1?this.error(this.msg||"Unexpected value"):this:this.error(this.msg||"Invalid notIn() argument
 ")},m.prototype.min=function(a){var b=parseFloat(this.str);return!isNaN(b)&&b<a?this.error(this.msg||"Invalid number"):this},m.prototype.max=function(a){var b=parseFloat(this.str);return!isNaN(b)&&b>a?this.error(this.msg||"Invalid number"):this},m.prototype.isArray=function(){return Array.isArray(this.str)?this:this.error(this.msg||"Not an array")};var n=a.Filter=function(){},o="\\r\\n\\t\\s";n.prototype.modify=function(a){this.str=a},n.prototype.convert=n.prototype.sanitize=function(a){return this.str=a,this},n.prototype.xss=function(b){return this.modify(a.xssClean(this.str,b)),this.str},n.prototype.entityDecode=function(){return this.modify(c(this.str)),this.str},n.prototype.entityEncode=function(){return this.modify(d(this.str)),this.str},n.prototype.ltrim=function(a){return a=a||o,this.modify(this.str.replace(new RegExp("^["+a+"]+","g"),"")),this.str},n.prototype.rtrim=function(a){return a=a||o,this.modify(this.str.replace(new RegExp("["+a+"]+$","g"),"")),this.str},n.prototype.
 trim=function(a){return a=a||o,this.modify(this.str.replace(new RegExp("^["+a+"]+|["+a+"]+$","g"),"")),this.str},n.prototype.ifNull=function(a){return(!this.str||this.str==="")&&this.modify(a),this.str},n.prototype.toFloat=function(){return this.modify(parseFloat(this.str)),this.str},n.prototype.toInt=function(a){return a=a||10,this.modify(parseInt(this.str),a),this.str},n.prototype.toBoolean=function(){return!this.str||this.str=="0"||this.str=="false"||this.str==""?this.modify(!1):this.modify(!0),this.str},n.prototype.toBooleanStrict=function(){return this.str=="1"||this.str=="true"?this.modify(!0):this.modify(!1),this.str},a.sanitize=a.convert=function(b){var c=new a.Filter;return c.sanitize(b)},a.check=a.validate=a.assert=function(b,c){var d=new a.Validator;return d.check(b,c)}})(typeof exports=="undefined"?window:exports);
\ No newline at end of file


Mime
View raw message