| 1:02 am on Sep 26, 2008 (gmt 0)|
Does the feed validate? [validator.w3.org]
Where are these HTML tags showing up?
Does a <description> element contain HTML markup?
If you need HTML tags in the feed itself you should use some HTML Character Entity Encoding. For example using the <BR> tag:
|<description>Blah blah blah blah blah blah blah blah <BR&;gt; blah blah blah blah blah blah.</description> |
[edited by: bill at 12:21 am (utc) on Dec. 17, 2008]
| 11:20 am on Dec 13, 2008 (gmt 0)|
I have the same question. From what I can gather, HTML tags aren't allowed inside the <description></description> tags. If I'm delivering a long article via RSS, I'd like to use <p> tags to break up the content, and I see that some news feeds do the same thing, and RSS readers seem to understand that. But the feed won't pass validation if I use <p> tags.
Similarly, I'd like to link to other content from my articles with <a href> tags, but that also kills validation. I think my options are:
(1) Don't use any tags, and have annoying long articles without breaks or links.
(2) Use <p> and <a> tags, and don't be concerned that the feed doesn't validate.
Is this correct?
| 12:58 am on Dec 16, 2008 (gmt 0)|
Right, you encode the tags.
<p> = <p>
</p> = </p>
| 2:38 pm on Dec 16, 2008 (gmt 0)|
I'm sorry, I misunderstood. I thought you were saying to use encoding if I want the user to be able to see the tags, if, for example, I'm writing an article about HTML. I tried encoding the tags and they work great, thanks.
But this begs the question: What if I *do* want the user to see the tags. On an HTML page < will show the user a < sign. How do I show the < and > signs in an RSS feed?
| 12:48 am on Dec 17, 2008 (gmt 0)|
XML has the following entity references:
& (& or "ampersand")
< (< or "less than")
> (> or "greater than")
' (' or "apostrophe")
" (" or "quotation mark")
You would use those codes in lieu of the characters in your feed. The HTML tags that use these characters are parsed by the system displaying the feed.
| 2:14 am on Dec 17, 2008 (gmt 0)|
Well, in my test the characters didn't show up. I included the string "<manchu>" in a description but it didn't. show up. Perhaps naked < and > characters will show up if they don't look like tags, but if everything that looks like a tag tries to get parsed as such, I think that means that I can't have an article about HTML tags, because there's no way to display things like <p> to the user. Is that right?