WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#19210 closed enhancement (fixed)

Add missing filters to remaining link(url) functions in feed.php

Reported by: MarcusPope Owned by: nacin
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.2.1
Component: Feeds Keywords: has-patch 3.4-early commit needs-codex
Focuses: Cc:

Description

All of the url-getting functions in wp-includes/feed.php use rss-specific filters on the resulting url except for the comment_link() & comments_link_feed() functions.

This patch adds a filter for massaging the url before it's sent through esc_url.

This fixes a current bug with the core dev team's recommended solution for root-relative urls, whereby adjusting the filters on get_permalink will inadvertantly and negatively affect rss feeds.

Attachments (1)

feed_filter_fix_clean.patch (523 bytes) - added by MarcusPope 5 years ago.
Added filters to comments_link and comment_link functions in feed.php

Download all attachments as: .zip

Change History (8)

@MarcusPope
5 years ago

Added filters to comments_link and comment_link functions in feed.php

#1 @nacin
5 years ago

  • Keywords 3.4-early added
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement

#2 @wonderboymusic
4 years ago

  • Milestone changed from Future Release to 3.6

#3 @SergeyBiryukov
4 years ago

  • Component changed from Permalinks to Feeds

#4 @SergeyBiryukov
4 years ago

  • Keywords commit added

#5 @nacin
4 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 23624:

Add filters to comments_link_feed(), comment_link(), and get_comments_link(). esc_url() the echoed output of comments_link().

props MarcusPope.
fixes #19210.

#6 @DrewAPicture
4 years ago

  • Keywords 3.6-codex added

#7 @DrewAPicture
4 years ago

  • Keywords needs-codex added; 3.6-codex removed
Note: See TracTickets for help on using tickets.