author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:52:52 +0200 | |
changeset 22 | 8c2e4d02f4ef |
parent 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1 |
/******/ (() => { // webpackBootstrap |
19 | 2 |
/******/ "use strict"; |
3 |
/******/ // The require scope |
|
4 |
/******/ var __webpack_require__ = {}; |
|
5 |
/******/ |
|
6 |
/************************************************************************/ |
|
7 |
/******/ /* webpack/runtime/define property getters */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
8 |
/******/ (() => { |
19 | 9 |
/******/ // define getter functions for harmony exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
10 |
/******/ __webpack_require__.d = (exports, definition) => { |
19 | 11 |
/******/ for(var key in definition) { |
12 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
13 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
14 |
/******/ } |
|
15 |
/******/ } |
|
9 | 16 |
/******/ }; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
17 |
/******/ })(); |
19 | 18 |
/******/ |
19 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
20 |
/******/ (() => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
21 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
22 |
/******/ })(); |
19 | 23 |
/******/ |
24 |
/******/ /* webpack/runtime/make namespace object */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
25 |
/******/ (() => { |
19 | 26 |
/******/ // define __esModule on exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
27 |
/******/ __webpack_require__.r = (exports) => { |
19 | 28 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
29 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
30 |
/******/ } |
|
31 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
32 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
33 |
/******/ })(); |
19 | 34 |
/******/ |
9 | 35 |
/************************************************************************/ |
19 | 36 |
var __webpack_exports__ = {}; |
16 | 37 |
// ESM COMPAT FLAG |
9 | 38 |
__webpack_require__.r(__webpack_exports__); |
39 |
||
16 | 40 |
// EXPORTS |
19 | 41 |
__webpack_require__.d(__webpack_exports__, { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
42 |
escapeAmpersand: () => (/* binding */ escapeAmpersand), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
43 |
escapeAttribute: () => (/* binding */ escapeAttribute), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
44 |
escapeEditableHTML: () => (/* binding */ escapeEditableHTML), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
45 |
escapeHTML: () => (/* binding */ escapeHTML), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
46 |
escapeLessThan: () => (/* binding */ escapeLessThan), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
47 |
escapeQuotationMark: () => (/* binding */ escapeQuotationMark), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
48 |
isValidAttributeName: () => (/* binding */ isValidAttributeName) |
19 | 49 |
}); |
16 | 50 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
51 |
;// ./node_modules/@wordpress/escape-html/build-module/escape-greater.js |
9 | 52 |
/** |
53 |
* Returns a string with greater-than sign replaced. |
|
54 |
* |
|
55 |
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer |
|
56 |
* necessary for `__unstableEscapeGreaterThan` to exist. |
|
57 |
* |
|
58 |
* See: https://core.trac.wordpress.org/ticket/45387 |
|
59 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
60 |
* @param value Original string. |
9 | 61 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
62 |
* @return Escaped string. |
9 | 63 |
*/ |
64 |
function __unstableEscapeGreaterThan(value) { |
|
65 |
return value.replace(/>/g, '>'); |
|
66 |
} |
|
67 |
||
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
68 |
;// ./node_modules/@wordpress/escape-html/build-module/index.js |
9 | 69 |
/** |
70 |
* Internal dependencies |
|
71 |
*/ |
|
72 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
73 |
|
9 | 74 |
/** |
75 |
* Regular expression matching invalid attribute names. |
|
76 |
* |
|
77 |
* "Attribute names must consist of one or more characters other than controls, |
|
78 |
* U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), |
|
79 |
* and noncharacters." |
|
80 |
* |
|
16 | 81 |
* @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 |
9 | 82 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
83 |
const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/; |
9 | 84 |
|
85 |
/** |
|
86 |
* Returns a string with ampersands escaped. Note that this is an imperfect |
|
87 |
* implementation, where only ampersands which do not appear as a pattern of |
|
88 |
* named, decimal, or hexadecimal character references are escaped. Invalid |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
89 |
* named references (i.e. ambiguous ampersand) are still permitted. |
9 | 90 |
* |
16 | 91 |
* @see https://w3c.github.io/html/syntax.html#character-references |
92 |
* @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand |
|
93 |
* @see https://w3c.github.io/html/syntax.html#named-character-references |
|
9 | 94 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
95 |
* @param value Original string. |
9 | 96 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
97 |
* @return Escaped string. |
9 | 98 |
*/ |
99 |
function escapeAmpersand(value) { |
|
100 |
return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&'); |
|
101 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
102 |
|
9 | 103 |
/** |
104 |
* Returns a string with quotation marks replaced. |
|
105 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
106 |
* @param value Original string. |
9 | 107 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
108 |
* @return Escaped string. |
9 | 109 |
*/ |
110 |
function escapeQuotationMark(value) { |
|
111 |
return value.replace(/"/g, '"'); |
|
112 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
113 |
|
9 | 114 |
/** |
115 |
* Returns a string with less-than sign replaced. |
|
116 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
117 |
* @param value Original string. |
9 | 118 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
119 |
* @return Escaped string. |
9 | 120 |
*/ |
121 |
function escapeLessThan(value) { |
|
122 |
return value.replace(/</g, '<'); |
|
123 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
124 |
|
9 | 125 |
/** |
126 |
* Returns an escaped attribute value. |
|
127 |
* |
|
16 | 128 |
* @see https://w3c.github.io/html/syntax.html#elements-attributes |
9 | 129 |
* |
130 |
* "[...] the text cannot contain an ambiguous ampersand [...] must not contain |
|
131 |
* any literal U+0022 QUOTATION MARK characters (")" |
|
132 |
* |
|
133 |
* Note we also escape the greater than symbol, as this is used by wptexturize to |
|
134 |
* split HTML strings. This is a WordPress specific fix |
|
135 |
* |
|
136 |
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer |
|
137 |
* necessary for `__unstableEscapeGreaterThan` to be used. |
|
138 |
* |
|
139 |
* See: https://core.trac.wordpress.org/ticket/45387 |
|
140 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
141 |
* @param value Attribute value. |
9 | 142 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
143 |
* @return Escaped attribute value. |
9 | 144 |
*/ |
145 |
function escapeAttribute(value) { |
|
146 |
return __unstableEscapeGreaterThan(escapeQuotationMark(escapeAmpersand(value))); |
|
147 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
148 |
|
9 | 149 |
/** |
150 |
* Returns an escaped HTML element value. |
|
151 |
* |
|
16 | 152 |
* @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements |
9 | 153 |
* |
154 |
* "the text must not contain the character U+003C LESS-THAN SIGN (<) or an |
|
155 |
* ambiguous ampersand." |
|
156 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
157 |
* @param value Element value. |
9 | 158 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
159 |
* @return Escaped HTML element value. |
9 | 160 |
*/ |
161 |
function escapeHTML(value) { |
|
162 |
return escapeLessThan(escapeAmpersand(value)); |
|
163 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
164 |
|
9 | 165 |
/** |
16 | 166 |
* Returns an escaped Editable HTML element value. This is different from |
167 |
* `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in |
|
168 |
* order to render the content correctly on the page. |
|
169 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
170 |
* @param value Element value. |
16 | 171 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
172 |
* @return Escaped HTML element value. |
16 | 173 |
*/ |
174 |
function escapeEditableHTML(value) { |
|
175 |
return escapeLessThan(value.replace(/&/g, '&')); |
|
176 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
177 |
|
16 | 178 |
/** |
9 | 179 |
* Returns true if the given attribute name is valid, or false otherwise. |
180 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
181 |
* @param name Attribute name to test. |
9 | 182 |
* |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
183 |
* @return Whether attribute is valid. |
9 | 184 |
*/ |
185 |
function isValidAttributeName(name) { |
|
186 |
return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name); |
|
187 |
} |
|
188 |
||
19 | 189 |
(window.wp = window.wp || {}).escapeHtml = __webpack_exports__; |
190 |
/******/ })() |
|
191 |
; |