plugin updates

This commit is contained in:
Tony Volpe
2024-11-15 13:53:04 -05:00
parent 1293d604ca
commit 0238f0c4ca
2009 changed files with 163492 additions and 89543 deletions

View File

@@ -57,9 +57,9 @@ __webpack_require__.d(__webpack_exports__, {
*
* See: https://core.trac.wordpress.org/ticket/45387
*
* @param {string} value Original string.
* @param value Original string.
*
* @return {string} Escaped string.
* @return Escaped string.
*/
function __unstableEscapeGreaterThan(value) {
return value.replace(/>/g, '>');
@@ -79,8 +79,6 @@ function __unstableEscapeGreaterThan(value) {
* and noncharacters."
*
* @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
*
* @type {RegExp}
*/
const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;
@@ -94,9 +92,9 @@ const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;
* @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand
* @see https://w3c.github.io/html/syntax.html#named-character-references
*
* @param {string} value Original string.
* @param value Original string.
*
* @return {string} Escaped string.
* @return Escaped string.
*/
function escapeAmpersand(value) {
return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&');
@@ -105,9 +103,9 @@ function escapeAmpersand(value) {
/**
* Returns a string with quotation marks replaced.
*
* @param {string} value Original string.
* @param value Original string.
*
* @return {string} Escaped string.
* @return Escaped string.
*/
function escapeQuotationMark(value) {
return value.replace(/"/g, '"');
@@ -116,9 +114,9 @@ function escapeQuotationMark(value) {
/**
* Returns a string with less-than sign replaced.
*
* @param {string} value Original string.
* @param value Original string.
*
* @return {string} Escaped string.
* @return Escaped string.
*/
function escapeLessThan(value) {
return value.replace(/</g, '&lt;');
@@ -140,9 +138,9 @@ function escapeLessThan(value) {
*
* See: https://core.trac.wordpress.org/ticket/45387
*
* @param {string} value Attribute value.
* @param value Attribute value.
*
* @return {string} Escaped attribute value.
* @return Escaped attribute value.
*/
function escapeAttribute(value) {
return __unstableEscapeGreaterThan(escapeQuotationMark(escapeAmpersand(value)));
@@ -156,9 +154,9 @@ function escapeAttribute(value) {
* "the text must not contain the character U+003C LESS-THAN SIGN (<) or an
* ambiguous ampersand."
*
* @param {string} value Element value.
* @param value Element value.
*
* @return {string} Escaped HTML element value.
* @return Escaped HTML element value.
*/
function escapeHTML(value) {
return escapeLessThan(escapeAmpersand(value));
@@ -169,9 +167,9 @@ function escapeHTML(value) {
* `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in
* order to render the content correctly on the page.
*
* @param {string} value Element value.
* @param value Element value.
*
* @return {string} Escaped HTML element value.
* @return Escaped HTML element value.
*/
function escapeEditableHTML(value) {
return escapeLessThan(value.replace(/&/g, '&amp;'));
@@ -180,9 +178,9 @@ function escapeEditableHTML(value) {
/**
* Returns true if the given attribute name is valid, or false otherwise.
*
* @param {string} name Attribute name to test.
* @param name Attribute name to test.
*
* @return {boolean} Whether attribute is valid.
* @return Whether attribute is valid.
*/
function isValidAttributeName(name) {
return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name);