wp/wp-includes/js/dist/escape-html.js
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
--- a/wp/wp-includes/js/dist/escape-html.js	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/js/dist/escape-html.js	Fri Sep 05 18:52:52 2025 +0200
@@ -48,7 +48,7 @@
   isValidAttributeName: () => (/* binding */ isValidAttributeName)
 });
 
-;// CONCATENATED MODULE: ./node_modules/@wordpress/escape-html/build-module/escape-greater.js
+;// ./node_modules/@wordpress/escape-html/build-module/escape-greater.js
 /**
  * Returns a string with greater-than sign replaced.
  *
@@ -57,15 +57,15 @@
  *
  * 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, '>');
 }
 
-;// CONCATENATED MODULE: ./node_modules/@wordpress/escape-html/build-module/index.js
+;// ./node_modules/@wordpress/escape-html/build-module/index.js
 /**
  * Internal dependencies
  */
@@ -79,8 +79,6 @@
  * 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 @@
  * @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 @@
 /**
  * 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 @@
 /**
  * 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 @@
  *
  * 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 @@
  * "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 @@
  * `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 @@
 /**
  * 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);