Skip to content

Stdlib: html_entity_decode() default flags — named entities like   not decoded (ext/standard/html.c) #10763

Description

@PurHur

Category

stdlib — php-src-strict

Problem

With default flags (ENT_COMPAT | ENT_HTML401), html_entity_decode(' ') must decode named HTML entities to their UTF-8 bytes. This compiler leaves   literal.

Verified 2026-06-23 on VM (php bin/vm.php).

php-src reference

Repro

test/repro/maintainer_gap_html_entity_decode_nbsp.php

php test/repro/maintainer_gap_html_entity_decode_nbsp.php           # exit 0
php bin/vm.php test/repro/maintainer_gap_html_entity_decode_nbsp.php  # exit 1

Zend PHP: PASS (\u{00A0})

This compiler:   unchanged

Implementation hint

Done when

  • Repro exits 0 on VM
  •  , <, > decode with default flags
  • Targeted compliance guard under test/compliance/cases/stdlib/
  • ./script/ci-fast.sh green

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions