Home > Web Programming > Drupal RSS feeds in Internet Explorer 7

Drupal RSS feeds in Internet Explorer 7

November 21, 2006 Leave a comment Go to comments

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:

    1. Open modules/node.module
    2. 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!

Advertisements
  1. July 26, 2014 at 08:01

    Hi there to all, how is the whole thing, I think every one is getting more from
    this website, and your views are nice designed for new visitors.

  2. August 27, 2014 at 21:48

    Amazing blog! Is your theme custom made or did you download it from somewhere?
    A theme like yours with a few simple adjustements would
    really make my blog shine. Please let me know where you got your
    theme. With thanks

  3. March 15, 2016 at 19:41

    I just couldn’t go away your website before suggesting that I
    exttremely enjoyed thhe staneard information a person supply
    on you visitors? Is going to be back regularly in ordder to check out new
    posts

  1. No trackbacks yet.

Share your thoughts! Note: to post source code, enclose it in [code lang=...] [/code] tags. Valid values for 'lang' are cpp, csharp, xml, javascript, php etc. To post compiler errors or other text that is best read monospaced, use 'text' as the value for lang.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: