Webmastersite.net
Register Log In

Problem with RSS feed
Interpreting html incorrectly (or not at all)

Comments on Problem with RSS feed

jsflinks
Experienced

Usergroup: Customer
Joined: Jul 28, 2005

Total Topics: 30
Total Comments: 55
Posted Nov 24, 2005 - 12:25 AM:

The html links internal to the descriptions aren't working correctly in my RSS feed. I'm seeing the whole code between the <> brackets, not the hyperlinked text. For example, I see this
<a href="http://www.telegraph.co.uk/news/main.jhtml?xml=/news/2005/11/20/wdarwin20.xml&sSheet=/portal/2005/11/20/ixportal.html">Telegraph report,</a>

Instead of a hyperlinked "Telegraph report."

Any tips on how to fix this?

My site is here:
http://www.elementlist.com/lnx/index.php

And my RSS link is here:
feed://www.elementlist.com/lnx/rssfeed.php?type=links&number =5&field=time&ascdesc=descending&condition=catid=56

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 26, 2005 - 9:14 AM:

As mentioned in the other thread it's not really good practice according to a google search, but it may work in some readers if you do this:

In rssfeed.php, replace
   $str = str_replace('&', '&', $str); // prevent &str&str;   
$str = str_replace('&', '&', $str);
return $str;
with
   $str = str_replace('&', '&', $str); // prevent &str&str;  
$str = str_replace('<', '<', $str); // let html work
$str = str_replace('>', '>', $str); // let html work
$str = str_replace('&', '&', $str);
return $str;

Synozeer
Forum Regular

Usergroup: Customer
Joined: Jun 02, 2004

Total Topics: 32
Total Comments: 142
Posted Nov 26, 2005 - 3:53 PM:

You might be better off letting the Static File Generation created your RSS file. I use:


www.YOURSITE.com/rssfeed.ph...cending&thecondition=type='regular'&title=YOURSITE.com


and then have it save as:

rss/new-games.xml

That'll give you a much shorter URL and will also cut down on queries.

Adam
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.