-
-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Tempest version
2.14.0
PHP version
8.4
Operating system
Linux
Description
When an element contains a text node whose content starts with the character "0", the Tempest view parser behaves incorrectly.
- The text content of the element is removed, leaving the element empty.
- Rendering then stops entirely, causing all following element nodes to be skipped and not rendered.
This results in incomplete output, even though the input markup is valid and contains no dynamic expressions.
Steps to reproduce
Test Environment
- using the default TempestPHP application scaffold: tempest-app
(composer create-project tempest/app) - Minimal modification: home.view.php adapted with the example markup
- Tempest version: 2.14.0
- PHP versions: 8.4.15 + 8.5.0 (packages.sury.org)
- Composer version: 2.9.2
- Operating system: Linux Debian GNU/Linux 13 (trixie)
Example
Input
<!-- home.view.php -->
<x-base>
<h1>0 breaks rendering</h1>
<h2>1 is never rendered</h2>
</x-base>
Output
<body>
<h1></h1>
</body>
Control Example
Input
<!-- home.view.php -->
<x-base>
<h1> 0 no longer breaks rendering</h1>
<h2>1 is still rendered</h2>
</x-base>
Output
<body>
<h1> 0 no longer breaks rendering</h1>
<h2>1 is still rendered</h2>
</body>
Metadata
Metadata
Assignees
Labels
No labels