Make WordPress Core

Opened 12 months ago

Last modified 12 months ago

#58951 new defect (bug)

Meta and Link tags contain trailing slashes

Reported by: simbaclaws's profile simbaclaws Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2.2
Component: General Keywords: has-patch needs-dev-note
Focuses: Cc:

Description

Dear wordpress core,

I'm trying to remove all of the trailing slashes in wordpress core from the meta and link tags according to the W3C.

Whenever I have a blank wordpress site, and check that site with the w3c validator, I get a lot of info messages with the following text in it:
Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.

I made a fork of the wordpress master repository, and created a branch named trailingslash, where I think I've succesfully removed most if not all trailing slashes.

Please review my code.

Change History (5)

This ticket was mentioned in PR #4947 on WordPress/wordpress-develop by Simbaclaws.


12 months ago
#1

  • Keywords has-patch added

I tried to remove all trailing slashes on all link and meta tags in wordpress core.

Trac ticket: https://core.trac.wordpress.org/ticket/58951

Simbaclaws commented on PR #4947:


12 months ago
#2

Seems like unit tests are failing when trying to remove the trailing slashes.... Was this already known?

#3 @rajinsharwar
12 months ago

  • Keywords has-dev-note added

I guess, we need to update the Unit tests as well.

#4 @rajinsharwar
12 months ago

  • Keywords needs-dev-note added; has-dev-note removed

#5 @simbaclaws
12 months ago

That would be nice, although I'm not sure if the syntax checkers in phpstorm for example are able to see that there are no errors. I think that removing the trailing slashes also creates a problem where syntax looks like it is wrong even though it is not. I'll do some extensive testing to see whether wordpress still works the way it should.

Note: See TracTickets for help on using tickets.