Skip to content

[Form] Use self-closing <input /> syntax again, reverting #47715 #53656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Jan 28, 2024

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #53649
License MIT

This PR reverts #47715 and puts the trailing slash back into <input .../> markup in the form themes.

The reasons are outlined in detail in #53649. Basically, the trailing slash in void elements like <input> is not required in HTML 5, yet it is perfectly valid and compliant with specs.

Writing markup that way is required to parse and process it with an XML parser, like libxml2 underlying all of the PHP DOM, XML etc. extensions.

HTML 5 capable parser support has been added to PHP in php/php-src#12111 and will be available with PHP 8.4. So, we might want to remove the trailing slashes once Symfony requires at least PHP 8.4.

@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@xabbuh xabbuh changed the base branch from 7.1 to 6.4 January 28, 2024 15:56
@mpdude mpdude marked this pull request as ready for review January 28, 2024 15:57
@carsonbot carsonbot added this to the 6.4 milestone Jan 28, 2024
@mpdude
Copy link
Contributor Author

mpdude commented Jan 28, 2024

Appveyor test failures seem to be unrelated.

What’s the problem with license headers reported by fabbot?

@xabbuh
Copy link
Member

xabbuh commented Jan 29, 2024

Can you please drop the code style commit? You can ignore fabbot's suggestions on these files as well as the license issues.

@mpdude mpdude force-pushed the revert-input-slash branch from 9c9e965 to 8c92200 Compare January 29, 2024 10:35
@mpdude
Copy link
Contributor Author

mpdude commented Jan 29, 2024

@xabbuh done

@nicolas-grekas
Copy link
Member

Thank you @mpdude.

@nicolas-grekas nicolas-grekas merged commit 7aab885 into symfony:6.4 Jan 29, 2024
@mpdude mpdude deleted the revert-input-slash branch January 29, 2024 11:21
This was referenced Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Form] Use self-closing <input /> tags again
4 participants