Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/updraftp.../includes/handleba...
File: handlebars.js
/**!
[0] Fix | Delete
[1] Fix | Delete
@license
[2] Fix | Delete
handlebars v4.7.7
[3] Fix | Delete
[4] Fix | Delete
Copyright (C) 2011-2019 by Yehuda Katz
[5] Fix | Delete
[6] Fix | Delete
Permission is hereby granted, free of charge, to any person obtaining a copy
[7] Fix | Delete
of this software and associated documentation files (the "Software"), to deal
[8] Fix | Delete
in the Software without restriction, including without limitation the rights
[9] Fix | Delete
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
[10] Fix | Delete
copies of the Software, and to permit persons to whom the Software is
[11] Fix | Delete
furnished to do so, subject to the following conditions:
[12] Fix | Delete
[13] Fix | Delete
The above copyright notice and this permission notice shall be included in
[14] Fix | Delete
all copies or substantial portions of the Software.
[15] Fix | Delete
[16] Fix | Delete
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
[17] Fix | Delete
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
[18] Fix | Delete
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
[19] Fix | Delete
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
[20] Fix | Delete
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
[21] Fix | Delete
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
[22] Fix | Delete
THE SOFTWARE.
[23] Fix | Delete
[24] Fix | Delete
*/
[25] Fix | Delete
(function webpackUniversalModuleDefinition(root, factory) {
[26] Fix | Delete
if(typeof exports === 'object' && typeof module === 'object')
[27] Fix | Delete
module.exports = factory();
[28] Fix | Delete
else if(typeof define === 'function' && define.amd)
[29] Fix | Delete
define([], factory);
[30] Fix | Delete
else if(typeof exports === 'object')
[31] Fix | Delete
exports["Handlebars"] = factory();
[32] Fix | Delete
else
[33] Fix | Delete
root["Handlebars"] = factory();
[34] Fix | Delete
})(this, function() {
[35] Fix | Delete
return /******/ (function(modules) { // webpackBootstrap
[36] Fix | Delete
/******/ // The module cache
[37] Fix | Delete
/******/ var installedModules = {};
[38] Fix | Delete
[39] Fix | Delete
/******/ // The require function
[40] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[41] Fix | Delete
[42] Fix | Delete
/******/ // Check if module is in cache
[43] Fix | Delete
/******/ if(installedModules[moduleId])
[44] Fix | Delete
/******/ return installedModules[moduleId].exports;
[45] Fix | Delete
[46] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[47] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[48] Fix | Delete
/******/ exports: {},
[49] Fix | Delete
/******/ id: moduleId,
[50] Fix | Delete
/******/ loaded: false
[51] Fix | Delete
/******/ };
[52] Fix | Delete
[53] Fix | Delete
/******/ // Execute the module function
[54] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[55] Fix | Delete
[56] Fix | Delete
/******/ // Flag the module as loaded
[57] Fix | Delete
/******/ module.loaded = true;
[58] Fix | Delete
[59] Fix | Delete
/******/ // Return the exports of the module
[60] Fix | Delete
/******/ return module.exports;
[61] Fix | Delete
/******/ }
[62] Fix | Delete
[63] Fix | Delete
[64] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[65] Fix | Delete
/******/ __webpack_require__.m = modules;
[66] Fix | Delete
[67] Fix | Delete
/******/ // expose the module cache
[68] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[69] Fix | Delete
[70] Fix | Delete
/******/ // __webpack_public_path__
[71] Fix | Delete
/******/ __webpack_require__.p = "";
[72] Fix | Delete
[73] Fix | Delete
/******/ // Load entry module and return exports
[74] Fix | Delete
/******/ return __webpack_require__(0);
[75] Fix | Delete
/******/ })
[76] Fix | Delete
/************************************************************************/
[77] Fix | Delete
/******/ ([
[78] Fix | Delete
/* 0 */
[79] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[80] Fix | Delete
[81] Fix | Delete
'use strict';
[82] Fix | Delete
[83] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[84] Fix | Delete
[85] Fix | Delete
exports.__esModule = true;
[86] Fix | Delete
[87] Fix | Delete
var _handlebarsRuntime = __webpack_require__(2);
[88] Fix | Delete
[89] Fix | Delete
var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
[90] Fix | Delete
[91] Fix | Delete
// Compiler imports
[92] Fix | Delete
[93] Fix | Delete
var _handlebarsCompilerAst = __webpack_require__(45);
[94] Fix | Delete
[95] Fix | Delete
var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
[96] Fix | Delete
[97] Fix | Delete
var _handlebarsCompilerBase = __webpack_require__(46);
[98] Fix | Delete
[99] Fix | Delete
var _handlebarsCompilerCompiler = __webpack_require__(51);
[100] Fix | Delete
[101] Fix | Delete
var _handlebarsCompilerJavascriptCompiler = __webpack_require__(52);
[102] Fix | Delete
[103] Fix | Delete
var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
[104] Fix | Delete
[105] Fix | Delete
var _handlebarsCompilerVisitor = __webpack_require__(49);
[106] Fix | Delete
[107] Fix | Delete
var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
[108] Fix | Delete
[109] Fix | Delete
var _handlebarsNoConflict = __webpack_require__(44);
[110] Fix | Delete
[111] Fix | Delete
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
[112] Fix | Delete
[113] Fix | Delete
var _create = _handlebarsRuntime2['default'].create;
[114] Fix | Delete
function create() {
[115] Fix | Delete
var hb = _create();
[116] Fix | Delete
[117] Fix | Delete
hb.compile = function (input, options) {
[118] Fix | Delete
return _handlebarsCompilerCompiler.compile(input, options, hb);
[119] Fix | Delete
};
[120] Fix | Delete
hb.precompile = function (input, options) {
[121] Fix | Delete
return _handlebarsCompilerCompiler.precompile(input, options, hb);
[122] Fix | Delete
};
[123] Fix | Delete
[124] Fix | Delete
hb.AST = _handlebarsCompilerAst2['default'];
[125] Fix | Delete
hb.Compiler = _handlebarsCompilerCompiler.Compiler;
[126] Fix | Delete
hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
[127] Fix | Delete
hb.Parser = _handlebarsCompilerBase.parser;
[128] Fix | Delete
hb.parse = _handlebarsCompilerBase.parse;
[129] Fix | Delete
hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
[130] Fix | Delete
[131] Fix | Delete
return hb;
[132] Fix | Delete
}
[133] Fix | Delete
[134] Fix | Delete
var inst = create();
[135] Fix | Delete
inst.create = create;
[136] Fix | Delete
[137] Fix | Delete
_handlebarsNoConflict2['default'](inst);
[138] Fix | Delete
[139] Fix | Delete
inst.Visitor = _handlebarsCompilerVisitor2['default'];
[140] Fix | Delete
[141] Fix | Delete
inst['default'] = inst;
[142] Fix | Delete
[143] Fix | Delete
exports['default'] = inst;
[144] Fix | Delete
module.exports = exports['default'];
[145] Fix | Delete
[146] Fix | Delete
/***/ }),
[147] Fix | Delete
/* 1 */
[148] Fix | Delete
/***/ (function(module, exports) {
[149] Fix | Delete
[150] Fix | Delete
"use strict";
[151] Fix | Delete
[152] Fix | Delete
exports["default"] = function (obj) {
[153] Fix | Delete
return obj && obj.__esModule ? obj : {
[154] Fix | Delete
"default": obj
[155] Fix | Delete
};
[156] Fix | Delete
};
[157] Fix | Delete
[158] Fix | Delete
exports.__esModule = true;
[159] Fix | Delete
[160] Fix | Delete
/***/ }),
[161] Fix | Delete
/* 2 */
[162] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[163] Fix | Delete
[164] Fix | Delete
'use strict';
[165] Fix | Delete
[166] Fix | Delete
var _interopRequireWildcard = __webpack_require__(3)['default'];
[167] Fix | Delete
[168] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[169] Fix | Delete
[170] Fix | Delete
exports.__esModule = true;
[171] Fix | Delete
[172] Fix | Delete
var _handlebarsBase = __webpack_require__(4);
[173] Fix | Delete
[174] Fix | Delete
var base = _interopRequireWildcard(_handlebarsBase);
[175] Fix | Delete
[176] Fix | Delete
// Each of these augment the Handlebars object. No need to setup here.
[177] Fix | Delete
// (This is done to easily share code between commonjs and browse envs)
[178] Fix | Delete
[179] Fix | Delete
var _handlebarsSafeString = __webpack_require__(37);
[180] Fix | Delete
[181] Fix | Delete
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
[182] Fix | Delete
[183] Fix | Delete
var _handlebarsException = __webpack_require__(6);
[184] Fix | Delete
[185] Fix | Delete
var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
[186] Fix | Delete
[187] Fix | Delete
var _handlebarsUtils = __webpack_require__(5);
[188] Fix | Delete
[189] Fix | Delete
var Utils = _interopRequireWildcard(_handlebarsUtils);
[190] Fix | Delete
[191] Fix | Delete
var _handlebarsRuntime = __webpack_require__(38);
[192] Fix | Delete
[193] Fix | Delete
var runtime = _interopRequireWildcard(_handlebarsRuntime);
[194] Fix | Delete
[195] Fix | Delete
var _handlebarsNoConflict = __webpack_require__(44);
[196] Fix | Delete
[197] Fix | Delete
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
[198] Fix | Delete
[199] Fix | Delete
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
[200] Fix | Delete
function create() {
[201] Fix | Delete
var hb = new base.HandlebarsEnvironment();
[202] Fix | Delete
[203] Fix | Delete
Utils.extend(hb, base);
[204] Fix | Delete
hb.SafeString = _handlebarsSafeString2['default'];
[205] Fix | Delete
hb.Exception = _handlebarsException2['default'];
[206] Fix | Delete
hb.Utils = Utils;
[207] Fix | Delete
hb.escapeExpression = Utils.escapeExpression;
[208] Fix | Delete
[209] Fix | Delete
hb.VM = runtime;
[210] Fix | Delete
hb.template = function (spec) {
[211] Fix | Delete
return runtime.template(spec, hb);
[212] Fix | Delete
};
[213] Fix | Delete
[214] Fix | Delete
return hb;
[215] Fix | Delete
}
[216] Fix | Delete
[217] Fix | Delete
var inst = create();
[218] Fix | Delete
inst.create = create;
[219] Fix | Delete
[220] Fix | Delete
_handlebarsNoConflict2['default'](inst);
[221] Fix | Delete
[222] Fix | Delete
inst['default'] = inst;
[223] Fix | Delete
[224] Fix | Delete
exports['default'] = inst;
[225] Fix | Delete
module.exports = exports['default'];
[226] Fix | Delete
[227] Fix | Delete
/***/ }),
[228] Fix | Delete
/* 3 */
[229] Fix | Delete
/***/ (function(module, exports) {
[230] Fix | Delete
[231] Fix | Delete
"use strict";
[232] Fix | Delete
[233] Fix | Delete
exports["default"] = function (obj) {
[234] Fix | Delete
if (obj && obj.__esModule) {
[235] Fix | Delete
return obj;
[236] Fix | Delete
} else {
[237] Fix | Delete
var newObj = {};
[238] Fix | Delete
[239] Fix | Delete
if (obj != null) {
[240] Fix | Delete
for (var key in obj) {
[241] Fix | Delete
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
[242] Fix | Delete
}
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
newObj["default"] = obj;
[246] Fix | Delete
return newObj;
[247] Fix | Delete
}
[248] Fix | Delete
};
[249] Fix | Delete
[250] Fix | Delete
exports.__esModule = true;
[251] Fix | Delete
[252] Fix | Delete
/***/ }),
[253] Fix | Delete
/* 4 */
[254] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[255] Fix | Delete
[256] Fix | Delete
'use strict';
[257] Fix | Delete
[258] Fix | Delete
var _interopRequireDefault = __webpack_require__(1)['default'];
[259] Fix | Delete
[260] Fix | Delete
exports.__esModule = true;
[261] Fix | Delete
exports.HandlebarsEnvironment = HandlebarsEnvironment;
[262] Fix | Delete
[263] Fix | Delete
var _utils = __webpack_require__(5);
[264] Fix | Delete
[265] Fix | Delete
var _exception = __webpack_require__(6);
[266] Fix | Delete
[267] Fix | Delete
var _exception2 = _interopRequireDefault(_exception);
[268] Fix | Delete
[269] Fix | Delete
var _helpers = __webpack_require__(10);
[270] Fix | Delete
[271] Fix | Delete
var _decorators = __webpack_require__(30);
[272] Fix | Delete
[273] Fix | Delete
var _logger = __webpack_require__(32);
[274] Fix | Delete
[275] Fix | Delete
var _logger2 = _interopRequireDefault(_logger);
[276] Fix | Delete
[277] Fix | Delete
var _internalProtoAccess = __webpack_require__(33);
[278] Fix | Delete
[279] Fix | Delete
var VERSION = '4.7.7';
[280] Fix | Delete
exports.VERSION = VERSION;
[281] Fix | Delete
var COMPILER_REVISION = 8;
[282] Fix | Delete
exports.COMPILER_REVISION = COMPILER_REVISION;
[283] Fix | Delete
var LAST_COMPATIBLE_COMPILER_REVISION = 7;
[284] Fix | Delete
[285] Fix | Delete
exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
[286] Fix | Delete
var REVISION_CHANGES = {
[287] Fix | Delete
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
[288] Fix | Delete
2: '== 1.0.0-rc.3',
[289] Fix | Delete
3: '== 1.0.0-rc.4',
[290] Fix | Delete
4: '== 1.x.x',
[291] Fix | Delete
5: '== 2.0.0-alpha.x',
[292] Fix | Delete
6: '>= 2.0.0-beta.1',
[293] Fix | Delete
7: '>= 4.0.0 <4.3.0',
[294] Fix | Delete
8: '>= 4.3.0'
[295] Fix | Delete
};
[296] Fix | Delete
[297] Fix | Delete
exports.REVISION_CHANGES = REVISION_CHANGES;
[298] Fix | Delete
var objectType = '[object Object]';
[299] Fix | Delete
[300] Fix | Delete
function HandlebarsEnvironment(helpers, partials, decorators) {
[301] Fix | Delete
this.helpers = helpers || {};
[302] Fix | Delete
this.partials = partials || {};
[303] Fix | Delete
this.decorators = decorators || {};
[304] Fix | Delete
[305] Fix | Delete
_helpers.registerDefaultHelpers(this);
[306] Fix | Delete
_decorators.registerDefaultDecorators(this);
[307] Fix | Delete
}
[308] Fix | Delete
[309] Fix | Delete
HandlebarsEnvironment.prototype = {
[310] Fix | Delete
constructor: HandlebarsEnvironment,
[311] Fix | Delete
[312] Fix | Delete
logger: _logger2['default'],
[313] Fix | Delete
log: _logger2['default'].log,
[314] Fix | Delete
[315] Fix | Delete
registerHelper: function registerHelper(name, fn) {
[316] Fix | Delete
if (_utils.toString.call(name) === objectType) {
[317] Fix | Delete
if (fn) {
[318] Fix | Delete
throw new _exception2['default']('Arg not supported with multiple helpers');
[319] Fix | Delete
}
[320] Fix | Delete
_utils.extend(this.helpers, name);
[321] Fix | Delete
} else {
[322] Fix | Delete
this.helpers[name] = fn;
[323] Fix | Delete
}
[324] Fix | Delete
},
[325] Fix | Delete
unregisterHelper: function unregisterHelper(name) {
[326] Fix | Delete
delete this.helpers[name];
[327] Fix | Delete
},
[328] Fix | Delete
[329] Fix | Delete
registerPartial: function registerPartial(name, partial) {
[330] Fix | Delete
if (_utils.toString.call(name) === objectType) {
[331] Fix | Delete
_utils.extend(this.partials, name);
[332] Fix | Delete
} else {
[333] Fix | Delete
if (typeof partial === 'undefined') {
[334] Fix | Delete
throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
[335] Fix | Delete
}
[336] Fix | Delete
this.partials[name] = partial;
[337] Fix | Delete
}
[338] Fix | Delete
},
[339] Fix | Delete
unregisterPartial: function unregisterPartial(name) {
[340] Fix | Delete
delete this.partials[name];
[341] Fix | Delete
},
[342] Fix | Delete
[343] Fix | Delete
registerDecorator: function registerDecorator(name, fn) {
[344] Fix | Delete
if (_utils.toString.call(name) === objectType) {
[345] Fix | Delete
if (fn) {
[346] Fix | Delete
throw new _exception2['default']('Arg not supported with multiple decorators');
[347] Fix | Delete
}
[348] Fix | Delete
_utils.extend(this.decorators, name);
[349] Fix | Delete
} else {
[350] Fix | Delete
this.decorators[name] = fn;
[351] Fix | Delete
}
[352] Fix | Delete
},
[353] Fix | Delete
unregisterDecorator: function unregisterDecorator(name) {
[354] Fix | Delete
delete this.decorators[name];
[355] Fix | Delete
},
[356] Fix | Delete
/**
[357] Fix | Delete
* Reset the memory of illegal property accesses that have already been logged.
[358] Fix | Delete
* @deprecated should only be used in handlebars test-cases
[359] Fix | Delete
*/
[360] Fix | Delete
resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
[361] Fix | Delete
_internalProtoAccess.resetLoggedProperties();
[362] Fix | Delete
}
[363] Fix | Delete
};
[364] Fix | Delete
[365] Fix | Delete
var log = _logger2['default'].log;
[366] Fix | Delete
[367] Fix | Delete
exports.log = log;
[368] Fix | Delete
exports.createFrame = _utils.createFrame;
[369] Fix | Delete
exports.logger = _logger2['default'];
[370] Fix | Delete
[371] Fix | Delete
/***/ }),
[372] Fix | Delete
/* 5 */
[373] Fix | Delete
/***/ (function(module, exports) {
[374] Fix | Delete
[375] Fix | Delete
'use strict';
[376] Fix | Delete
[377] Fix | Delete
exports.__esModule = true;
[378] Fix | Delete
exports.extend = extend;
[379] Fix | Delete
exports.indexOf = indexOf;
[380] Fix | Delete
exports.escapeExpression = escapeExpression;
[381] Fix | Delete
exports.isEmpty = isEmpty;
[382] Fix | Delete
exports.createFrame = createFrame;
[383] Fix | Delete
exports.blockParams = blockParams;
[384] Fix | Delete
exports.appendContextPath = appendContextPath;
[385] Fix | Delete
var escape = {
[386] Fix | Delete
'&': '&amp;',
[387] Fix | Delete
'<': '&lt;',
[388] Fix | Delete
'>': '&gt;',
[389] Fix | Delete
'"': '&quot;',
[390] Fix | Delete
"'": '&#x27;',
[391] Fix | Delete
'`': '&#x60;',
[392] Fix | Delete
'=': '&#x3D;'
[393] Fix | Delete
};
[394] Fix | Delete
[395] Fix | Delete
var badChars = /[&<>"'`=]/g,
[396] Fix | Delete
possible = /[&<>"'`=]/;
[397] Fix | Delete
[398] Fix | Delete
function escapeChar(chr) {
[399] Fix | Delete
return escape[chr];
[400] Fix | Delete
}
[401] Fix | Delete
[402] Fix | Delete
function extend(obj /* , ...source */) {
[403] Fix | Delete
for (var i = 1; i < arguments.length; i++) {
[404] Fix | Delete
for (var key in arguments[i]) {
[405] Fix | Delete
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
[406] Fix | Delete
obj[key] = arguments[i][key];
[407] Fix | Delete
}
[408] Fix | Delete
}
[409] Fix | Delete
}
[410] Fix | Delete
[411] Fix | Delete
return obj;
[412] Fix | Delete
}
[413] Fix | Delete
[414] Fix | Delete
var toString = Object.prototype.toString;
[415] Fix | Delete
[416] Fix | Delete
exports.toString = toString;
[417] Fix | Delete
// Sourced from lodash
[418] Fix | Delete
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
[419] Fix | Delete
/* eslint-disable func-style */
[420] Fix | Delete
var isFunction = function isFunction(value) {
[421] Fix | Delete
return typeof value === 'function';
[422] Fix | Delete
};
[423] Fix | Delete
// fallback for older versions of Chrome and Safari
[424] Fix | Delete
/* istanbul ignore next */
[425] Fix | Delete
if (isFunction(/x/)) {
[426] Fix | Delete
exports.isFunction = isFunction = function (value) {
[427] Fix | Delete
return typeof value === 'function' && toString.call(value) === '[object Function]';
[428] Fix | Delete
};
[429] Fix | Delete
}
[430] Fix | Delete
exports.isFunction = isFunction;
[431] Fix | Delete
[432] Fix | Delete
/* eslint-enable func-style */
[433] Fix | Delete
[434] Fix | Delete
/* istanbul ignore next */
[435] Fix | Delete
var isArray = Array.isArray || function (value) {
[436] Fix | Delete
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
[437] Fix | Delete
};
[438] Fix | Delete
[439] Fix | Delete
exports.isArray = isArray;
[440] Fix | Delete
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
[441] Fix | Delete
[442] Fix | Delete
function indexOf(array, value) {
[443] Fix | Delete
for (var i = 0, len = array.length; i < len; i++) {
[444] Fix | Delete
if (array[i] === value) {
[445] Fix | Delete
return i;
[446] Fix | Delete
}
[447] Fix | Delete
}
[448] Fix | Delete
return -1;
[449] Fix | Delete
}
[450] Fix | Delete
[451] Fix | Delete
function escapeExpression(string) {
[452] Fix | Delete
if (typeof string !== 'string') {
[453] Fix | Delete
// don't escape SafeStrings, since they're already safe
[454] Fix | Delete
if (string && string.toHTML) {
[455] Fix | Delete
return string.toHTML();
[456] Fix | Delete
} else if (string == null) {
[457] Fix | Delete
return '';
[458] Fix | Delete
} else if (!string) {
[459] Fix | Delete
return string + '';
[460] Fix | Delete
}
[461] Fix | Delete
[462] Fix | Delete
// Force a string conversion as this will be done by the append regardless and
[463] Fix | Delete
// the regex test will do this transparently behind the scenes, causing issues if
[464] Fix | Delete
// an object's to string has escaped characters in it.
[465] Fix | Delete
string = '' + string;
[466] Fix | Delete
}
[467] Fix | Delete
[468] Fix | Delete
if (!possible.test(string)) {
[469] Fix | Delete
return string;
[470] Fix | Delete
}
[471] Fix | Delete
return string.replace(badChars, escapeChar);
[472] Fix | Delete
}
[473] Fix | Delete
[474] Fix | Delete
function isEmpty(value) {
[475] Fix | Delete
if (!value && value !== 0) {
[476] Fix | Delete
return true;
[477] Fix | Delete
} else if (isArray(value) && value.length === 0) {
[478] Fix | Delete
return true;
[479] Fix | Delete
} else {
[480] Fix | Delete
return false;
[481] Fix | Delete
}
[482] Fix | Delete
}
[483] Fix | Delete
[484] Fix | Delete
function createFrame(object) {
[485] Fix | Delete
var frame = extend({}, object);
[486] Fix | Delete
frame._parent = object;
[487] Fix | Delete
return frame;
[488] Fix | Delete
}
[489] Fix | Delete
[490] Fix | Delete
function blockParams(params, ids) {
[491] Fix | Delete
params.path = ids;
[492] Fix | Delete
return params;
[493] Fix | Delete
}
[494] Fix | Delete
[495] Fix | Delete
function appendContextPath(contextPath, id) {
[496] Fix | Delete
return (contextPath ? contextPath + '.' : '') + id;
[497] Fix | Delete
}
[498] Fix | Delete
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function