 |
 |
Markup in RSS
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
I'm maintaining a couple RSS feeds, which are read mostly by users of NetNewsWire [Lite]. For some reason I can't get any markup to display. For example, the string "line<br />break" displays as "linebrbreak" and "<p>line</p><p>break</p>" shows up as "pp".
This is what a typical .xml file looks like (it's dynamically generated):
Code:
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>IT/suggestions</title>
<description>Suggestions</description>
<link>http://www.link.com</link>
<copyright>31 January, 2005</copyright>
<item>
<title>Suggestion from Morgan (2005-02-01)</title>
<description>Here's what I think you shd do</description>
</item>
</channel>
</rss>
Any ideas? All I can think of is that I don't have the right headers.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
I don't see any markup in the code you've attached. What program are you using? It might be stripping the markup out of your posts.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Originally posted by Millennium:
I don't see any markup in the code you've attached. What program are you using? It might be stripping the markup out of your posts.
Yeah sorry, I had deleted the items with markup in them. When I view the feed in Safari, the markups work fine. When I view the feed in NetNewsWire, they exhibit the behavior I described above. I've also tried it in Feed (a freeware RSS reader) and it behaved in the same was as NetNewsWire.
I know that NetNewsWire is capable of displaying markup though, as I've viewed other feeds that use it (and checked their code and made sure they were doing it the same way as me).
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Here's a better example of the feed file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>IT/suggestions</title>
<description>Suggestions</description>
<link>http://www.link.com</link>
<copyright>31 January, 2005</copyright>
<item>
<title>Suggestion from josh (2005-02-01)</title>
<description>line<br />break
<p>line</p><p>break</p></description>
</item>
<item>
<title>Suggestion from Morgan (2005-02-01)</title>
<description>Here's what I think you shd do</description>
</item>
</channel>
</rss>
And here's how the top item displays in NetNewsWire:

|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
Are you enclosing descriptions that have HTML in CDATA or entity-encoding it?
Example using CDATA:
<description><![CDATA[<p>Here's what I think you should do</p>]]></description>
or usng entity-encoding:
<description><p>Here's what I think you should do</p></description>
|
|
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Originally posted by madmacgames:
Are you enclosing descriptions that have HTML in CDATA or entity-encoding it?
Example using CDATA:
or usng entity-encoding:
Why no, no I'm not. And doing so fixed it.
Thank you!
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
NetNewsWire may have been stripping your markup out on its own, by the way. Some RSS readers do this, partly for security reasons and partly so they can reformat it in their own way.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |