Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#37249 new defect (bug)

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

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

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 8 years ago.
37249-2.diff (925 bytes) - added by birgire 5 years ago.

Download all attachments as: .zip

Change History (5)

#1 @birgire
8 years ago

  • Keywords has-patch added

#2 @desrosj
5 years ago

  • Keywords needs-refresh added

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

@birgire
5 years ago

#3 @birgire
5 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.