Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#22362 closed defect (bug) (fixed)

Titles of RSS feeds lacks spacing - words are run together

Reported by: davidanderson's profile DavidAnderson Owned by: sergeybiryukov's profile 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 11 years ago.

Download all attachments as: .zip

Change History (6)

#2 @DavidAnderson
11 years ago

Issue still present in WordPress 3.9.1.

#3 @SergeyBiryukov
11 years 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.

#4 @SergeyBiryukov
10 years ago

  • Keywords commit added

#5 @SergeyBiryukov
10 years 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.