Skip Menu |

This queue is for tickets about the XML-RSS CPAN distribution.

Report information
The Basics
Id: 2330
Status: resolved
Priority: 0/
Queue: XML-RSS

People
Owner: KELLAN [...] cpan.org
Requestors: simra [...] cim.mcgill.ca
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.02
Fixed in: (no value)



Subject: quote encoding
using XML::RSS 1.02 and XML::Parser 2.31 perl -v This is perl, v5.8.0 built for i386-linux-thread-multi uname -a Linux Beren.Simra.Net 2.4.20 #2 Wed Feb 5 16:58:59 EST 2003 i686 i686 i386 GNU/Linux I am having problems with RSS files that include &quot in links. The XML parser appears to be translating these to ", which is fine, but the quotes are not re-encoded when they are saved, resulting in a malformed token when I try to reload the saved file. For example the link http://foo.com/index.cgi?id=&quot;Hi&quot; is translated to http://foo.com/index.cgi?id="Hi" by the parser. When I save the link in an RSS file, the " isn't translated back to &quot; This results in the line <rdf:li rdf:resource="http://foo.com/index.cgi?id="Hi"" /> which will clearly break the parser when it's reloaded. A simple patch is to add $text=~s/"/\&quot;/g; at line 1789 of RSS.pm However, I wonder if the problem is actually in XML::Parser, since it doesn't make a lot of sense to translate &quot to " in the first place. I notice that &quot is not a member of %entities in RSS.pm
From: simra [...] cim.mcgill.ca
[guest - Wed Apr 2 11:14:39 2003]: Show quoted text
> using XML::RSS 1.02 > and XML::Parser 2.31 > perl -v > This is perl, v5.8.0 built for i386-linux-thread-multi > uname -a > Linux Beren.Simra.Net 2.4.20 #2 Wed Feb 5 16:58:59 EST 2003 i686 i686 > i386 GNU/Linux > > I am having problems with RSS files that include &amp;quot in links. The > XML parser appears to be translating these to ", which is fine, but > the quotes are not re-encoded when they are saved, resulting in a > malformed token when I try to reload the saved file. > For example the link http://foo.com/index.cgi?id=&amp;quot;Hi&amp;quot; > is translated to http://foo.com/index.cgi?id="Hi" by the parser. When > I save the link in an RSS file, the " isn't translated back to > &amp;quot; This results in the line > <rdf:li rdf:resource="http://foo.com/index.cgi?id="Hi"" /> > which will clearly break the parser when it's reloaded. > > A simple patch is to add > $text=~s/"/\&amp;quot;/g; at line 1789 of RSS.pm > However, I wonder if the problem is actually in XML::Parser, since it > doesn't make a lot of sense to translate &quot to " in the first > place. > I notice that &amp;quot is not a member of %entities in RSS.pm > > > >
This isn't going to make much sense if you're reading it in a browser, since it will translate all my &amp;quot; to ". I've fixed that problem in the above quoted tect. sorry for the confusion.