Repository navigation
Commit 0709277
authored
fix(admin): prevent URL editing of unsupported blocks (#4314)
* fix(admin): prevent URL editing of unsupported blocks
Implement the report's minimum safety fix: unregistered blocks without an existing string id/url, including WordPress buttons, no longer offer a URL editor that creates stray parent IDs. Show a localized preservation notice, retain deletion and URL-bearing import editing, and notify node views when registry definitions arrive after mount. Added regression coverage and a patch changeset. Verified 34 focused Chromium tests, admin typecheck, zero quick-lint diagnostics, formatting, root build with increased Node heap, and before/after plus Arabic RTL screenshots. Independent follow-up review found no remaining defects. Full Buttons editing/insertion remains outside this PR.
EmDash-Bot-Case: 1198246700-issue-5950893317
EmDash-Bot-Candidate: cand-1-025bf2c08a
* fix(admin): prevent URL editing of unsupported blocks
Address review of #4314: recognize surviving non-empty node IDs after HTML paste so imported embed/file URL controls remain available, while identity-less pasted Buttons stay protected. Hoist the empty pluginBlocks default to avoid redundant registry broadcasts. Added real HTML clipboard regressions and existing stray-ID compatibility coverage. Documented that prior stray IDs retain controls and that the pre-existing clipboard url-to-id serialization bug is outside this PR. Verified 38 focused Chromium tests, admin typecheck, quick lint (zero diagnostics), formatting and root build with an increased heap. Independent follow-up review found no new defects.
EmDash-Bot-Case: 1198246700-issue-5950893317
EmDash-Bot-Candidate: cand-2-b528e3510a
---------
Co-authored-by: emdash-autofix[bot] <emdash-autofix[bot]@users.noreply.github.com>1 parent 046ec3c commit 0709277
5 files changed
Lines changed: 330 additions & 41 deletions
File tree
- .changeset
- packages/admin
- src/components
- editor
- tests/editor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
407 | 408 | | |
408 | 409 | | |
409 | 410 | | |
410 | | - | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| |||
3467 | 3467 | | |
3468 | 3468 | | |
3469 | 3469 | | |
| 3470 | + | |
| 3471 | + | |
3470 | 3472 | | |
3471 | 3473 | | |
3472 | 3474 | | |
| |||
3477 | 3479 | | |
3478 | 3480 | | |
3479 | 3481 | | |
3480 | | - | |
| 3482 | + | |
3481 | 3483 | | |
3482 | 3484 | | |
3483 | 3485 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | | - | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
198 | | - | |
199 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
200 | 215 | | |
| 216 | + | |
| 217 | + | |
201 | 218 | | |
202 | 219 | | |
203 | 220 | | |
| |||
206 | 223 | | |
207 | 224 | | |
208 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
209 | 230 | | |
210 | 231 | | |
211 | 232 | | |
| |||
220 | 241 | | |
221 | 242 | | |
222 | 243 | | |
223 | | - | |
| 244 | + | |
224 | 245 | | |
225 | 246 | | |
226 | 247 | | |
| |||
284 | 305 | | |
285 | 306 | | |
286 | 307 | | |
287 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
288 | 313 | | |
289 | 314 | | |
290 | 315 | | |
291 | | - | |
| 316 | + | |
292 | 317 | | |
293 | 318 | | |
294 | 319 | | |
| |||
298 | 323 | | |
299 | 324 | | |
300 | 325 | | |
301 | | - | |
| 326 | + | |
302 | 327 | | |
303 | 328 | | |
304 | 329 | | |
| |||
324 | 349 | | |
325 | 350 | | |
326 | 351 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
349 | 378 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
359 | 386 | | |
360 | 387 | | |
361 | 388 | | |
| |||
371 | 398 | | |
372 | 399 | | |
373 | 400 | | |
374 | | - | |
| 401 | + | |
375 | 402 | | |
376 | 403 | | |
377 | 404 | | |
| |||
447 | 474 | | |
448 | 475 | | |
449 | 476 | | |
| 477 | + | |
450 | 478 | | |
451 | 479 | | |
452 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments