[wp-trac] [WordPress Trac] #52865: Strip 'enclosed' trailing spaces in URLs

WordPress Trac noreply at wordpress.org
Tue Jun 10 15:43:47 UTC 2025


#52865: Strip 'enclosed' trailing spaces in URLs
-------------------------------+------------------------------
 Reporter:  jonoaldersonwp     |       Owner:  (none)
     Type:  enhancement        |      Status:  new
 Priority:  low                |   Milestone:  Awaiting Review
Component:  Canonical          |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  performance
-------------------------------+------------------------------

Comment (by jonoaldersonwp):

 Replying to [comment:2 flixos90]:
 > @jonoaldersonwp On the one hand, changing `redirect_canonical()` to
 cater for URLs with trailing slashes seems very reasonable to me. On the
 other hand, wouldn't that then break existing sites with such URLs? I'm
 wondering if there would be backward compatibility issues.

 It's my assumption that redirect_canonical fires after we know that the
 request is a 404 / doesn't match a known resouce, so we should be safe?
 Maybe that's not the case!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52865#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list