Skip to content

Stdlib: DOMDocument::saveHTML() emit xmlns nsDef like Zend (#30350) - #30351

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-30350-savehtml-xmlns
Aug 11, 2026
Merged

Stdlib: DOMDocument::saveHTML() emit xmlns nsDef like Zend (#30350)#30351
PurHur merged 1 commit into
masterfrom
agent/issue-30350-savehtml-xmlns

Conversation

@PurHur

@PurHur PurHur commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • Zend vs VM vs JIT: php bin/vm.php test/repro/issue_30350_dom_savehtml_xmlns.php (and bin/jit.php) — all match Zend
  • Related void/empty saveHTML still matches Zend
  • Added test/compliance/cases/dom/dom_savehtml_xmlns_nsdef.phpt + repro
  • Full VMTest/JITTest not run (suite not green on master; targeted repro only)

Closes #30350

Made with Cursor

serializeHtmlElement used Attr-map-only dumping, so loadXML/createElementNS
namespace declarations vanished under saveHTML while saveXML stayed correct.
Reuse serializeElementAttributes (htmlNodeDump nsDef) for the HTML path.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit e8368ea into master Aug 11, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-30350-savehtml-xmlns branch August 11, 2026 18:56
PurHur added a commit that referenced this pull request Aug 11, 2026
…lace (#30363) (#30370)

Regenerate docs/bootstrap-inventory.md so --check matches tip after #30351/#30357
(method-count drift). No gen-0 fingerprint restamp.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: DOMDocument::saveHTML() drops xmlns / xmlns:* nsDef — Zend htmlNodeDump keeps them (ext/dom/document.c)

1 participant