8000 Changing `nl2br` from `<br />` to `<br>` by ThomasLandauer · Pull Request #3841 · twigphp/Twig · GitHub
[go: up one dir, main page]

Skip to content

Changing nl2br from <br /> to <br> #3841

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

Closed
wants to merge 1 commit into from

Conversation

ThomasLandauer
Copy link
Contributor

https://validator.w3.org/nu/ says:

Warning: Self-closing tag syntax in text/html documents is widely discouraged; it’s unnecessary and interacts badly with other HTML features (e.g., unquoted attribute values). If you’re using a tool that injects self-closing tag syntax into all void elements, without any option to prevent it from doing so, then consider switching to a different tool.

See also symfony/symfony-docs#17308

https://validator.w3.org/nu/ says:

> Warning: Self-closing tag syntax in text/html documents is [widely discouraged](https://google.github.io/styleguide/htmlcssguide.html#Document_Type); it’s unnecessary and [interacts badly with other HTML features](https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=10809) (e.g., unquoted attribute values). If you’re using a tool that injects self-closing tag syntax into all void elements, [without any option to prevent it from doing so](prettier/prettier#5246), then consider switching to a different tool.

See also symfony/symfony-docs#17308
@VincentLanglet
Copy link
Contributor
VincentLanglet commented Aug 18, 2024

For reference, the change introduced in Symfony was reverted (symfony/symfony#53649)
So it does not seems to be a good idea to remove the / here for the same reason.

@fabpot
Copy link
Contributor
fabpot commented Aug 19, 2024

Closing here then. @VincentLanglet thank you for the heads up.

@fabpot fabpot closed this Aug 19, 2024
@ThomasLandauer ThomasLandauer deleted the patch-1 branch August 19, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0