[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [syndication] RSS 0.94
Bill Kearney <wkearney99@hotmail.com> wrote:
Come up with a standardised way of including the character "<" in text
in the <item><description> element. Is it &lt; ? And does that mean
that "&" should be &amp; ?
This is already defined in XML. It's < and &. There have been tools
that incorrecty double-encode things. The only time these would ever appear as
&lt; or &amp; would be if you truly intended to display the
text as such
in an HTML interpreter.
This is the problem. And hence the suggestion for a guideline in the
spec. It seems that while most if not all RSS providers encode & and <
most of the time when they are HTML tags, there's several different
approaches to handling these when their characters in the text. It's
something that has had quite a lot of discussion on various mailing
lists. But I'm not sure that a definite conclusion was reached.
If you,for some reason, needed to produce an HTML formatted string that
also had
markup, say to demonstrate formatting XML, you would have to double-encode the
characters used for that markup.
<description>
A <b>&<title></b> element might have to use double
encoding.
<description>
Yup. That's the situation I'm concerned about.
If your tool can't properly handle what you need, encoding wise,
then it's time to shop around for a new one.
Indeed. And the biggest problem comes on the receiving end as a tool
writer. There's enough high profile feeds out there who double encode,
*everything* to make it awkward. There's some others who encode some
elements but not others, and hence need fixing. The net result is that
I've been seeing final text that clearly contains text descriptions of
RSS tags but where the tag text is missing. Somewhere either in my own
tool or in the RSS, the process is breaking. Guess I'll have to go and
debug it!
--
Julian Bond Email&MSM: julian.bond@voidstar.com
Webmaster: http://www.ecademy.com/
Personal WebLog: http://www.voidstar.com/
CV/Resume: http://www.voidstar.com/cv/
M: +44 (0)77 5907 2173 T: +44 (0)192 0412 433