Archive
Archive for November, 2006
Drupal RSS feeds in Internet Explorer 7
November 21, 2006
Leave a comment
Anybody who’s used Internet Explorer 7 for reading RSS feeds has probably noticed something annoying: it doesn’t support feeds with DTDs (Document Type Definitions).
Ironically, Outlook supports RSS feeds with DTDs but the functionality was conservatively disabled in IE7 due to concerns about Denial of Service attacks (reference: Internet Explorer Chats (12 October 2006)).
Here’s a quick hack to make RSS feeds genreated by Drupal work in IE7:
- Open
modules/node.module
- Towards the end of the function
node_feed()
, comment out the DTD line as shown:$output = "<?xml version=\"1.0\" encoding=\"utf-8\"?> "; // Comment out this line to disable DTD declaration // $output .= "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">]> // "; $output .= "<rss version=\"". $channel["version"] . "\" xml:base=\"". $base_url ."\"> "; $output .= format_rss_channel($channel['title'], $channel['link'], $channel['description'], $items, $channel['language']); $output .= "</rss> ";
In Drupal 4.6.5, this can be found approximately on line 1172 of the code.
Now go to your feed URL again, and you should be able to successfully subscribe in Internet Explorer 7. Hope this helps somebody!