WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 13 months ago

#22362 closed defect (bug) (fixed)

Titles of RSS feeds lacks spacing - words are run together

Reported by: DavidAnderson Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.4.2
Component: Feeds Keywords: has-patch commit
Focuses: Cc:

Description

Line 24 of wp-includes/feed-rss2.php has:

<title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>

There's no space between those two parts. In my (development) site, for the feed for a category "News" (which is the main one I'm offering up), that results in:

<title>SitenameNews</title>

Attachments (1)

22362.patch (931 bytes) - added by SergeyBiryukov 14 months ago.

Download all attachments as: .zip

Change History (6)

comment:2 @DavidAnderson15 months ago

Issue still present in WordPress 3.9.1.

@SergeyBiryukov14 months ago

comment:3 @SergeyBiryukov14 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.0

Could not reproduce with default themes.

get_wp_title_rss() has &#187; as a default separator: tags/3.9.1/src/wp-includes/feed.php#L91.

This is the same issue as in #21366. It only happens if the theme has a custom function attached to wp_title, and that function doesn't include an is_feed() check (as in [21276]). The fix for the theme would be like [21327].

If #21366 is not an option due to backwards compatibility issues, we could probably enforce the separator in get_wp_title_rss() if the filtered title doesn't start with a space. 22362.patch does that.

comment:4 @SergeyBiryukov13 months ago

  • Keywords commit added

comment:5 @SergeyBiryukov13 months ago

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

In 28921:

Force a separator in get_wp_title_rss() if it was inadvertently filtered out by the theme.

fixes #22362.

Note: See TracTickets for help on using tickets.