Skip Menu |
 

This queue is for tickets about the HTML-Tree CPAN distribution.

Report information
The Basics
Id: 93431
Status: open
Priority: 0/
Queue: HTML-Tree

People
Owner: KENTNL [...] cpan.org
Requestors: tomaz.solc [...] tablix.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 5.03
Fixed in: (no value)



Subject: Patch: don't needlessly escape characters in element content
Download (untitled) / with headers
text/plain 625b
Hi The as_XML() method in HTML::Tree 5.03 always escapes <, >, ', " and & characters when they appear in element attributes and content. However, apostrophes and double-quotes often appear in English text and they don't need to be escaped in XML content (only in attributes). What HTML::Tree currently does is technically correct, but not very convenient for any human that wants to read its output. "It's" is easier to read than "It&apos;s". It's also saves a few bytes. Attached patch fixes the as_XML() method so that it only escapes apostrophes and double-quotes when they appear in element attributes. Thanks Tomaž
Subject: dont_escape_quotes_in_text
Download dont_escape_quotes_in_text
application/octet-stream 3k

Message body not shown because it is not plain text.

I've had to regretfully revert this patch as-is for now, as it caused a substantial amount of fallout that I don't have time to dig into right now.


-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 



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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.