Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-inclu.../js/dist
File: html-entities.js
/******/ (() => { // webpackBootstrap
[0] Fix | Delete
/******/ "use strict";
[1] Fix | Delete
/******/ // The require scope
[2] Fix | Delete
/******/ var __webpack_require__ = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/************************************************************************/
[5] Fix | Delete
/******/ /* webpack/runtime/define property getters */
[6] Fix | Delete
/******/ (() => {
[7] Fix | Delete
/******/ // define getter functions for harmony exports
[8] Fix | Delete
/******/ __webpack_require__.d = (exports, definition) => {
[9] Fix | Delete
/******/ for(var key in definition) {
[10] Fix | Delete
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
[11] Fix | Delete
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
[12] Fix | Delete
/******/ }
[13] Fix | Delete
/******/ }
[14] Fix | Delete
/******/ };
[15] Fix | Delete
/******/ })();
[16] Fix | Delete
/******/
[17] Fix | Delete
/******/ /* webpack/runtime/hasOwnProperty shorthand */
[18] Fix | Delete
/******/ (() => {
[19] Fix | Delete
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
[20] Fix | Delete
/******/ })();
[21] Fix | Delete
/******/
[22] Fix | Delete
/******/ /* webpack/runtime/make namespace object */
[23] Fix | Delete
/******/ (() => {
[24] Fix | Delete
/******/ // define __esModule on exports
[25] Fix | Delete
/******/ __webpack_require__.r = (exports) => {
[26] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[27] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[28] Fix | Delete
/******/ }
[29] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[30] Fix | Delete
/******/ };
[31] Fix | Delete
/******/ })();
[32] Fix | Delete
/******/
[33] Fix | Delete
/************************************************************************/
[34] Fix | Delete
var __webpack_exports__ = {};
[35] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[36] Fix | Delete
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
[37] Fix | Delete
/* harmony export */ decodeEntities: () => (/* binding */ decodeEntities)
[38] Fix | Delete
/* harmony export */ });
[39] Fix | Delete
/** @type {HTMLTextAreaElement} */
[40] Fix | Delete
let _decodeTextArea;
[41] Fix | Delete
[42] Fix | Delete
/**
[43] Fix | Delete
* Decodes the HTML entities from a given string.
[44] Fix | Delete
*
[45] Fix | Delete
* @param {string} html String that contain HTML entities.
[46] Fix | Delete
*
[47] Fix | Delete
* @example
[48] Fix | Delete
* ```js
[49] Fix | Delete
* import { decodeEntities } from '@wordpress/html-entities';
[50] Fix | Delete
*
[51] Fix | Delete
* const result = decodeEntities( 'á' );
[52] Fix | Delete
* console.log( result ); // result will be "รก"
[53] Fix | Delete
* ```
[54] Fix | Delete
*
[55] Fix | Delete
* @return {string} The decoded string.
[56] Fix | Delete
*/
[57] Fix | Delete
function decodeEntities(html) {
[58] Fix | Delete
// Not a string, or no entities to decode.
[59] Fix | Delete
if ('string' !== typeof html || -1 === html.indexOf('&')) {
[60] Fix | Delete
return html;
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
// Create a textarea for decoding entities, that we can reuse.
[64] Fix | Delete
if (undefined === _decodeTextArea) {
[65] Fix | Delete
if (document.implementation && document.implementation.createHTMLDocument) {
[66] Fix | Delete
_decodeTextArea = document.implementation.createHTMLDocument('').createElement('textarea');
[67] Fix | Delete
} else {
[68] Fix | Delete
_decodeTextArea = document.createElement('textarea');
[69] Fix | Delete
}
[70] Fix | Delete
}
[71] Fix | Delete
_decodeTextArea.innerHTML = html;
[72] Fix | Delete
const decoded = _decodeTextArea.textContent;
[73] Fix | Delete
_decodeTextArea.innerHTML = '';
[74] Fix | Delete
[75] Fix | Delete
/**
[76] Fix | Delete
* Cast to string, HTMLTextAreaElement should always have `string` textContent.
[77] Fix | Delete
*
[78] Fix | Delete
* > The `textContent` property of the `Node` interface represents the text content of the
[79] Fix | Delete
* > node and its descendants.
[80] Fix | Delete
* >
[81] Fix | Delete
* > Value: A string or `null`
[82] Fix | Delete
* >
[83] Fix | Delete
* > * If the node is a `document` or a Doctype, `textContent` returns `null`.
[84] Fix | Delete
* > * If the node is a CDATA section, comment, processing instruction, or text node,
[85] Fix | Delete
* > textContent returns the text inside the node, i.e., the `Node.nodeValue`.
[86] Fix | Delete
* > * For other node types, `textContent returns the concatenation of the textContent of
[87] Fix | Delete
* > every child node, excluding comments and processing instructions. (This is an empty
[88] Fix | Delete
* > string if the node has no children.)
[89] Fix | Delete
*
[90] Fix | Delete
* @see https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
[91] Fix | Delete
*/
[92] Fix | Delete
return /** @type {string} */decoded;
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
(window.wp = window.wp || {}).htmlEntities = __webpack_exports__;
[96] Fix | Delete
/******/ })()
[97] Fix | Delete
;
[98] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function