Skip to content

Decode numeric HTML entities in html_entity_decode() ENT_HTML5 (#11510) - #11521

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-11510-html-entity-decode-numeric
Jun 25, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-11510-html-entity-decode-numeric

Conversation

@PurHur

@PurHur PurHur commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • html_entity_decode() with ENT_HTML5 now decodes decimal &#N; and hex &#xN; numeric character references.
  • Reuses existing decodeHtmlNumericEntity() from the HTML401 path (php-src ext/standard/html.c).

Verification

php bin/vm.php test/repro/issue_html_entity_decode_numeric.php
# A / A

php bin/compile.php -l test/repro/issue_html_entity_decode_numeric.php

Closes #11510

Made with Cursor

…11510).

Port &#N; and &#xN; handling from the HTML401 decoder into htmlEntityDecodeHtml5 (php-src ext/standard/html.c).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 2e4e75e into master Jun 25, 2026
@PurHur
PurHur deleted the agent/issue-11510-html-entity-decode-numeric branch June 25, 2026 06:26
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.

Stdlib: html_entity_decode() numeric entities &#N;/&#xN; — not decoded (ext/standard/html.c)

1 participant