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 " 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="Hi"
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 " 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/"/\"/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 " to " in the first place.
I notice that " is not a member of %entities in RSS.pm