Skip Menu |

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

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

Owner: Nobody in particular
Requestors: mmu+cpan [...]

Bug Information
Severity: Important
Broken in: 1.05
Fixed in: (no value)

Subject: Better xml escaping
Download (untitled) / with headers
text/plain 112b
I changed the encode_text sub so that it works more reliable, I also added more known html entities to the list.
text/x-perl 75.9k

Message body is not shown because it is too large.

Subject: encoding special characters
Download (untitled) / with headers
text/plain 1.3k
1.Distribution: XML-RSS-1.05.tar.gz 2.Perl: v5.6.1 3.Operating systems: Linux RedHat 7.3, 9.0 4.Error description: A lot of our editors use web based application to create new articles and store them into database. They usually use cut and paste techology, which means that they pick up all special characters as they are, literaly. There are no complains from database side when those data is inserted such one can find in the description of the article following text 'The company said its net profit was $1.21bn (£630m), on sales of $45.1bn.' In this text one can clearly see English pound as a special character pasted literaly and it will be accepted by MySQL query. On the other hand, when preparing RSS file using XML::RSS package will not parse it correctly since there is only one hash representing special characters in different way, such as for English pound '£'. This means that rss file will not be displayed correctly on browser (I tested it on IE and on Mozilla). 5.Patch: In order to fix this I added into subfunction encode_text() from package following code: my @text_char = unpack("C*", "$text"); my $text_tmp = ''; foreach my $i (@text_char) { if ($i > 127) { $i = '&#' . $i . ';'; $text_tmp .= $i; } else { $text_tmp .= pack("C*","$i"); } $text = $text_tmp; } Thanks. Lev Radin, prokurator at gmail dot com
Fixed in 1.12.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to