Ticket #432 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

support empty title RSS feeds

Reported by: salvatore@… Owned by: mdodoo
Priority: low Milestone: Gregarius 0.6.0
Component: FEATURES Version:
Severity: minor Keywords:
Cc:

Description

Hi guys, I created a patch to support RSS feeds with empty title (TAG: <title></title>). Title is set with "UNTITLED" keyword and link.

FILE: util.php LINE: 461

BEFORE PATCH:

elseif (is_object($rss) && array_key_exists('title', $rss->channel)) {
    $title = rss_real_escape_string($rss->channel['title']);
}

AFTER PATCH:

elseif (is_object($rss) && array_key_exists('title#', $rss->channel)) {
    if (array_key_exists('title',$rss->channel)) {
        $title = rss_real_escape_string($rss->channel['title']);
    } else {
        $title = "UNTITLED - ".rss_real_escape_string($rss->channel['link']);
    }
}

Regards, Salvatore

Change History

Changed 2 years ago by mdodoo

The title is a required element in both RSS 1.0 and RSS 2.0. Can you provide an example of a RSS feed that lacks a title?

Changed 2 years ago by salvatore@…

This feed lacks required elements:

http://addpost.ru/rss.xml

<?xml version="1.0" encoding="windows-1251"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title></title>
<link>http://addpost.ru/</link>
<language>ru</language>
<description></description>
<generator>DataLife Engine</generator>

Regards, Salvatore

Changed 2 years ago by mdodoo

  • milestone set to Gregarius 0.6.0

That feed has other problems as well (and is also not worksafe'''). I did create a RSS feed sans title from my own blog and was unable to add it to Gregarius.

Rather than adding "UNTITLED" to untitled feeds, I think it would be a better idea if Gregarius just left the title element empty, if possible, for purposes of localization.

Changed 2 years ago by mdodoo

  • owner changed from mbonetti to mdodoo
  • status changed from new to assigned
  • summary changed from [PATCH] Support empty title RSS feeds to support empty title RSS feeds

Changed 2 years ago by mdodoo

  • status changed from assigned to closed
  • resolution set to fixed

Fixed by [1594].

Note: See TracTickets for help on using tickets.