WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 2 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 3 years ago.
Added filters to comments_link and comment_link functions in feed.php

Download all attachments as: .zip

Change History (8)

@MarcusPope3 years ago

Added filters to comments_link and comment_link functions in feed.php

comment:1 @nacin3 years ago

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

comment:2 @wonderboymusic2 years ago

  • Milestone changed from Future Release to 3.6

comment:3 @SergeyBiryukov2 years ago

  • Component changed from Permalinks to Feeds

comment:4 @SergeyBiryukov2 years ago

  • Keywords commit added

comment:5 @nacin2 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.

comment:6 @DrewAPicture2 years ago

  • Keywords 3.6-codex added

comment:7 @DrewAPicture2 years ago

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