Open ryandemmer opened 1 month ago
Assuming you are logged in as a Super User:
<video src="images/big_buck_bunny_trailer_480p.mp4" autoplay controls width="854" height="315"></video>
Boolean attributes autoplay and controls are retained.
Boolean attributes autoplay and controls are removed.
Joomla 4.4.x amd Joomla 5.x PHP 8.x
If the boolean attributes are set as the last attributes, then they are retained, eg:
<video src="images/big_buck_bunny_trailer_480p.mp4" width="854" height="315" autoplay controls></video>
The boolean attributes are still removed if they have empty values, eg: controls="" The boolean attributes are not removed if they have non-empty values, eg: controls="controls"
Is there any paraticular reason why we might not use DOMDocument to extract and process tags and attributes? Performance?
Steps to reproduce the issue
Assuming you are logged in as a Super User:
Expected result
Boolean attributes autoplay and controls are retained.
Actual result
Boolean attributes autoplay and controls are removed.
System information (as much as possible)
Joomla 4.4.x amd Joomla 5.x PHP 8.x
Additional comments
If the boolean attributes are set as the last attributes, then they are retained, eg:
The boolean attributes are still removed if they have empty values, eg: controls="" The boolean attributes are not removed if they have non-empty values, eg: controls="controls"