Skip to content
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

Remove slash from void elements #21858

Open
2 tasks done
kkmuffme opened this issue Nov 23, 2024 · 4 comments
Open
2 tasks done

Remove slash from void elements #21858

kkmuffme opened this issue Nov 23, 2024 · 4 comments

Comments

@kkmuffme
Copy link
Contributor

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. open any page on frontend and look at the "meta" tags

Expected results

  1. void elements should not have a / before >

Actual results

Void elements contain outdated XHTML /> which is not valid HTML (but silently ignored)

https://developer.mozilla.org/en-US/docs/Glossary/Void_element
WordPress never serves a page with content-type application/xhtml+xml, therefore the XHTML compatibility is pointless.

WP core is currently also undergoing some changes to fix it in core https://core.trac.wordpress.org/ticket/59883

E.g. on previous PR consistently added them #16952 - but since the last 3 years (even back then it was outdated) it's become completely unused and should be removed.

Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.

Technical info

Used versions

  • Yoast SEO version: 23.9
@josevarghese
Copy link
Contributor

Hi @kkmuffme

Thanks for creating the issue.

This issue is a duplicate of the issue #2223, which got marked as closed with no plan to change this as it was not causing any problems or breaking anything with the meta tag being read by search engines. However, I asked our development team to check whether this change is required or not.

I will update you once I get more details.

@kkmuffme
Copy link
Contributor Author

Thanks. The referenced issue is almost 10 years old and things have changed since then, therefore I think it's valid to bring this up again. Especially if you look at the recent comments on that issue e.g. #2223 (comment)

@josevarghese
Copy link
Contributor

Internal Slack conversation: https://yoast.slack.com/archives/C01NCRHHN30/p1732452686091819

@BradFD
Copy link

BradFD commented Jan 4, 2025

+1 for no slashes as the new default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants