Edit File by line
/home/barbar84/public_h.../wp-inclu.../js/dist
File: escape-html.js
this["wp"] = this["wp"] || {}; this["wp"]["escapeHtml"] =
[0] Fix | Delete
/******/ (function(modules) { // webpackBootstrap
[1] Fix | Delete
/******/ // The module cache
[2] Fix | Delete
/******/ var installedModules = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/******/ // The require function
[5] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[6] Fix | Delete
/******/
[7] Fix | Delete
/******/ // Check if module is in cache
[8] Fix | Delete
/******/ if(installedModules[moduleId]) {
[9] Fix | Delete
/******/ return installedModules[moduleId].exports;
[10] Fix | Delete
/******/ }
[11] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[12] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[13] Fix | Delete
/******/ i: moduleId,
[14] Fix | Delete
/******/ l: false,
[15] Fix | Delete
/******/ exports: {}
[16] Fix | Delete
/******/ };
[17] Fix | Delete
/******/
[18] Fix | Delete
/******/ // Execute the module function
[19] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[20] Fix | Delete
/******/
[21] Fix | Delete
/******/ // Flag the module as loaded
[22] Fix | Delete
/******/ module.l = true;
[23] Fix | Delete
/******/
[24] Fix | Delete
/******/ // Return the exports of the module
[25] Fix | Delete
/******/ return module.exports;
[26] Fix | Delete
/******/ }
[27] Fix | Delete
/******/
[28] Fix | Delete
/******/
[29] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[30] Fix | Delete
/******/ __webpack_require__.m = modules;
[31] Fix | Delete
/******/
[32] Fix | Delete
/******/ // expose the module cache
[33] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[34] Fix | Delete
/******/
[35] Fix | Delete
/******/ // define getter function for harmony exports
[36] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[37] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[38] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[39] Fix | Delete
/******/ }
[40] Fix | Delete
/******/ };
[41] Fix | Delete
/******/
[42] Fix | Delete
/******/ // define __esModule on exports
[43] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[44] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[45] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[46] Fix | Delete
/******/ }
[47] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[48] Fix | Delete
/******/ };
[49] Fix | Delete
/******/
[50] Fix | Delete
/******/ // create a fake namespace object
[51] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[52] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[53] Fix | Delete
/******/ // mode & 4: return value when already ns object
[54] Fix | Delete
/******/ // mode & 8|1: behave like require
[55] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[56] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[57] Fix | Delete
/******/ if(mode & 8) return value;
[58] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[59] Fix | Delete
/******/ var ns = Object.create(null);
[60] Fix | Delete
/******/ __webpack_require__.r(ns);
[61] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[62] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[63] Fix | Delete
/******/ return ns;
[64] Fix | Delete
/******/ };
[65] Fix | Delete
/******/
[66] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[67] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[68] Fix | Delete
/******/ var getter = module && module.__esModule ?
[69] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[70] Fix | Delete
/******/ function getModuleExports() { return module; };
[71] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[72] Fix | Delete
/******/ return getter;
[73] Fix | Delete
/******/ };
[74] Fix | Delete
/******/
[75] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[76] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[77] Fix | Delete
/******/
[78] Fix | Delete
/******/ // __webpack_public_path__
[79] Fix | Delete
/******/ __webpack_require__.p = "";
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/
[82] Fix | Delete
/******/ // Load entry module and return exports
[83] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = "IsfW");
[84] Fix | Delete
/******/ })
[85] Fix | Delete
/************************************************************************/
[86] Fix | Delete
/******/ ({
[87] Fix | Delete
[88] Fix | Delete
/***/ "IsfW":
[89] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[90] Fix | Delete
[91] Fix | Delete
"use strict";
[92] Fix | Delete
// ESM COMPAT FLAG
[93] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[94] Fix | Delete
[95] Fix | Delete
// EXPORTS
[96] Fix | Delete
__webpack_require__.d(__webpack_exports__, "escapeAmpersand", function() { return /* binding */ escapeAmpersand; });
[97] Fix | Delete
__webpack_require__.d(__webpack_exports__, "escapeQuotationMark", function() { return /* binding */ escapeQuotationMark; });
[98] Fix | Delete
__webpack_require__.d(__webpack_exports__, "escapeLessThan", function() { return /* binding */ escapeLessThan; });
[99] Fix | Delete
__webpack_require__.d(__webpack_exports__, "escapeAttribute", function() { return /* binding */ escapeAttribute; });
[100] Fix | Delete
__webpack_require__.d(__webpack_exports__, "escapeHTML", function() { return /* binding */ escapeHTML; });
[101] Fix | Delete
__webpack_require__.d(__webpack_exports__, "escapeEditableHTML", function() { return /* binding */ escapeEditableHTML; });
[102] Fix | Delete
__webpack_require__.d(__webpack_exports__, "isValidAttributeName", function() { return /* binding */ isValidAttributeName; });
[103] Fix | Delete
[104] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/escape-html/build-module/escape-greater.js
[105] Fix | Delete
/**
[106] Fix | Delete
* Returns a string with greater-than sign replaced.
[107] Fix | Delete
*
[108] Fix | Delete
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer
[109] Fix | Delete
* necessary for `__unstableEscapeGreaterThan` to exist.
[110] Fix | Delete
*
[111] Fix | Delete
* See: https://core.trac.wordpress.org/ticket/45387
[112] Fix | Delete
*
[113] Fix | Delete
* @param {string} value Original string.
[114] Fix | Delete
*
[115] Fix | Delete
* @return {string} Escaped string.
[116] Fix | Delete
*/
[117] Fix | Delete
function __unstableEscapeGreaterThan(value) {
[118] Fix | Delete
return value.replace(/>/g, '>');
[119] Fix | Delete
}
[120] Fix | Delete
[121] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/escape-html/build-module/index.js
[122] Fix | Delete
/**
[123] Fix | Delete
* Internal dependencies
[124] Fix | Delete
*/
[125] Fix | Delete
[126] Fix | Delete
/**
[127] Fix | Delete
* Regular expression matching invalid attribute names.
[128] Fix | Delete
*
[129] Fix | Delete
* "Attribute names must consist of one or more characters other than controls,
[130] Fix | Delete
* U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=),
[131] Fix | Delete
* and noncharacters."
[132] Fix | Delete
*
[133] Fix | Delete
* @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
[134] Fix | Delete
*
[135] Fix | Delete
* @type {RegExp}
[136] Fix | Delete
*/
[137] Fix | Delete
[138] Fix | Delete
var REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;
[139] Fix | Delete
/**
[140] Fix | Delete
* Returns a string with ampersands escaped. Note that this is an imperfect
[141] Fix | Delete
* implementation, where only ampersands which do not appear as a pattern of
[142] Fix | Delete
* named, decimal, or hexadecimal character references are escaped. Invalid
[143] Fix | Delete
* named references (i.e. ambiguous ampersand) are are still permitted.
[144] Fix | Delete
*
[145] Fix | Delete
* @see https://w3c.github.io/html/syntax.html#character-references
[146] Fix | Delete
* @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand
[147] Fix | Delete
* @see https://w3c.github.io/html/syntax.html#named-character-references
[148] Fix | Delete
*
[149] Fix | Delete
* @param {string} value Original string.
[150] Fix | Delete
*
[151] Fix | Delete
* @return {string} Escaped string.
[152] Fix | Delete
*/
[153] Fix | Delete
[154] Fix | Delete
function escapeAmpersand(value) {
[155] Fix | Delete
return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&');
[156] Fix | Delete
}
[157] Fix | Delete
/**
[158] Fix | Delete
* Returns a string with quotation marks replaced.
[159] Fix | Delete
*
[160] Fix | Delete
* @param {string} value Original string.
[161] Fix | Delete
*
[162] Fix | Delete
* @return {string} Escaped string.
[163] Fix | Delete
*/
[164] Fix | Delete
[165] Fix | Delete
function escapeQuotationMark(value) {
[166] Fix | Delete
return value.replace(/"/g, '"');
[167] Fix | Delete
}
[168] Fix | Delete
/**
[169] Fix | Delete
* Returns a string with less-than sign replaced.
[170] Fix | Delete
*
[171] Fix | Delete
* @param {string} value Original string.
[172] Fix | Delete
*
[173] Fix | Delete
* @return {string} Escaped string.
[174] Fix | Delete
*/
[175] Fix | Delete
[176] Fix | Delete
function escapeLessThan(value) {
[177] Fix | Delete
return value.replace(/</g, '&lt;');
[178] Fix | Delete
}
[179] Fix | Delete
/**
[180] Fix | Delete
* Returns an escaped attribute value.
[181] Fix | Delete
*
[182] Fix | Delete
* @see https://w3c.github.io/html/syntax.html#elements-attributes
[183] Fix | Delete
*
[184] Fix | Delete
* "[...] the text cannot contain an ambiguous ampersand [...] must not contain
[185] Fix | Delete
* any literal U+0022 QUOTATION MARK characters (")"
[186] Fix | Delete
*
[187] Fix | Delete
* Note we also escape the greater than symbol, as this is used by wptexturize to
[188] Fix | Delete
* split HTML strings. This is a WordPress specific fix
[189] Fix | Delete
*
[190] Fix | Delete
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer
[191] Fix | Delete
* necessary for `__unstableEscapeGreaterThan` to be used.
[192] Fix | Delete
*
[193] Fix | Delete
* See: https://core.trac.wordpress.org/ticket/45387
[194] Fix | Delete
*
[195] Fix | Delete
* @param {string} value Attribute value.
[196] Fix | Delete
*
[197] Fix | Delete
* @return {string} Escaped attribute value.
[198] Fix | Delete
*/
[199] Fix | Delete
[200] Fix | Delete
function escapeAttribute(value) {
[201] Fix | Delete
return __unstableEscapeGreaterThan(escapeQuotationMark(escapeAmpersand(value)));
[202] Fix | Delete
}
[203] Fix | Delete
/**
[204] Fix | Delete
* Returns an escaped HTML element value.
[205] Fix | Delete
*
[206] Fix | Delete
* @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements
[207] Fix | Delete
*
[208] Fix | Delete
* "the text must not contain the character U+003C LESS-THAN SIGN (<) or an
[209] Fix | Delete
* ambiguous ampersand."
[210] Fix | Delete
*
[211] Fix | Delete
* @param {string} value Element value.
[212] Fix | Delete
*
[213] Fix | Delete
* @return {string} Escaped HTML element value.
[214] Fix | Delete
*/
[215] Fix | Delete
[216] Fix | Delete
function escapeHTML(value) {
[217] Fix | Delete
return escapeLessThan(escapeAmpersand(value));
[218] Fix | Delete
}
[219] Fix | Delete
/**
[220] Fix | Delete
* Returns an escaped Editable HTML element value. This is different from
[221] Fix | Delete
* `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in
[222] Fix | Delete
* order to render the content correctly on the page.
[223] Fix | Delete
*
[224] Fix | Delete
* @param {string} value Element value.
[225] Fix | Delete
*
[226] Fix | Delete
* @return {string} Escaped HTML element value.
[227] Fix | Delete
*/
[228] Fix | Delete
[229] Fix | Delete
function escapeEditableHTML(value) {
[230] Fix | Delete
return escapeLessThan(value.replace(/&/g, '&amp;'));
[231] Fix | Delete
}
[232] Fix | Delete
/**
[233] Fix | Delete
* Returns true if the given attribute name is valid, or false otherwise.
[234] Fix | Delete
*
[235] Fix | Delete
* @param {string} name Attribute name to test.
[236] Fix | Delete
*
[237] Fix | Delete
* @return {boolean} Whether attribute is valid.
[238] Fix | Delete
*/
[239] Fix | Delete
[240] Fix | Delete
function isValidAttributeName(name) {
[241] Fix | Delete
return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name);
[242] Fix | Delete
}
[243] Fix | Delete
[244] Fix | Delete
[245] Fix | Delete
/***/ })
[246] Fix | Delete
[247] Fix | Delete
/******/ });
[248] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function