Make WordPress Core

Opened 10 years ago

Last modified 8 years ago

#37249 new defect (bug)

Missing url escapes and 'author' link relation in wp_list_authors()

Reported by: birgire Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: normal Keywords: has-patch
Cc: Focuses: template

Description

Since WordPress 4.4 the function get_the_author_posts_link() is available:

​https://github.com/WordPress/WordPress/blob/4.4-branch/wp-includes/author-template.php#L236-268

It was introduced in #30355. It escapes the get_author_posts_url() as expected and uses rel="author" for the author link.

This is not the case with wp_list_authors() were e.g. both get_author_posts_url() and get_author_feed_link() are un-escaped.

ps:

My first thought was to have two separate tickets for the escape + relation, but I decided to combine it here as it corresponds to the same code.

It would have been handy to use get_author_posts_url() within wp_list_authors() but there's a slight difference there. If we had e.g. the input parameters get_author_posts_url( $author, $name ) then such a replacement could work ;-)

Attachments (2)

author-template.diff​ (1.1 KB ) - added by birgire 10 years ago.
37249-2.diff​ (925 bytes ) - added by birgire 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @birgire
10 years ago

  • Keywords has-patch added

#2 @desrosj
8 years ago

  • Keywords needs-refresh added

author-template.diff​ no longer applies cleanly and needs a refresh.

#3 @birgire
8 years ago

  • Keywords needs-refresh removed

Thanks for reviewing @desrosj

Refreshed the patch in 37249-2.diff​

Note: See TracTickets for help on using tickets.