You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stdlib: htmlspecialchars()/htmlentities() — ENT_HTML5 must emit ' not ' for apostrophe (ext/standard/html.c) #4958
stdlib · HTML encoding (encode path; #4130 covers decode)
Problem
With ENT_QUOTES | ENT_HTML5, encoding a single apostrophe must produce the named entity' per Zend / HTML5 rules. This compiler emits the numeric entity ' instead.
#4130 tracks html_entity_decode / htmlspecialchars_decode ENT_HTML5 decode parity; this issue is the encode side in htmlspecialchars() / htmlentities().
Merged #17035 — htmlEntitiesMapForFlags() now sets apostrophe to ' under ENT_QUOTES|ENT_HTML5; compliance htmlspecialchars_ent_html5*.phpt green on VM+JIT.
Activity
PurHur commentedon Jun 12, 2026
claim: worker-lane-c — starting this run
fix(stdlib): ENT_HTML5 apostrophe encoding in htmlspecialchars() (#4958…
PurHur commentedon Jun 12, 2026
Merged via #8121.
Verification:
```bash
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php test/repro-maintainer/repro_htmlspecialchars_ent_html5.php
php bin/vm.php test/repro-maintainer/repro_htmlspecialchars_ent_html5.php'
```
Zend + VM both output:
```
'
'
'
```
```bash
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter htmlspecialchars_ent_html5'
```
OK (4 tests, 4 assertions) — VM + JIT compliance.
PurHur commentedon Jul 6, 2026
claim: PHP Compiler STD Lib Advanced — htmlentities ENT_HTML5 apostrophe (#4958)
Stdlib: htmlentities() ENT_HTML5 apostrophe uses ' not ' (#4958
PurHur commentedon Jul 6, 2026
Merged #17035 — htmlEntitiesMapForFlags() now sets apostrophe to ' under ENT_QUOTES|ENT_HTML5; compliance htmlspecialchars_ent_html5*.phpt green on VM+JIT.