[MKDoc-commit] [MKDoc-XML] added test for double-encoding attribute
contents bug
bruno at mkdoc.demon.co.uk
bruno at mkdoc.demon.co.uk
Wed Mar 9 17:36:47 GMT 2005
Log Message:
-----------
[MKDoc-XML] added test for double-encoding attribute contents bug
Modified Files:
--------------
MKDoc-XML:
Changes
MANIFEST
Added Files:
-----------
MKDoc-XML/t:
305_MKDoc_XML_tagger_ampersand.t
-------------- next part --------------
Index: MANIFEST
===================================================================
RCS file: /var/spool/cvs/MKDoc-XML/MANIFEST,v
retrieving revision 1.14
retrieving revision 1.15
diff -LMANIFEST -LMANIFEST -u -r1.14 -r1.15
--- MANIFEST
+++ MANIFEST
@@ -35,6 +35,7 @@
t/302_MKDoc_XML_Tagger_Spaces.t
t/303_MKDoc_XML_Tagger_Nesting.t
t/304_MKDoc_XML_Tagger_Numbers.t
+t/305_MKDoc_XML_tagger_ampersand.t
t/400_MKDoc_XML_Stripper.t
t/401_MKDoc_XML_Stripper_p_not_closing.t
t/402_MKDoc_XML_Stripper_def.t
Index: Changes
===================================================================
RCS file: /var/spool/cvs/MKDoc-XML/Changes,v
retrieving revision 1.40
retrieving revision 1.41
diff -LChanges -LChanges -u -r1.40 -r1.41
--- Changes
+++ Changes
@@ -1,7 +1,7 @@
Revision history for MKDoc::XML
0.75
- - Added test for tagger bug when matching numbers
+ - Added tests for tagger bugs when matching numbers and double escaping attribute contents
0.74 Thu Dec 09 14:00:00 2004
- Fix for longstanding bug introduced in 0.66 that resulting in MKDoc::XML::Tagger producing invalid XML.
--- /dev/null
+++ t/305_MKDoc_XML_tagger_ampersand.t
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+use lib ('../lib', 'lib');
+use Test::More 'no_plan';
+use strict;
+use warnings;
+use MKDoc::XML::Tagger::Preserve;
+use MKDoc::XML::Tagger;
+
+TODO: {
+ local $TODO = 'Ampersand double-escaped';
+ my $text = MKDoc::XML::Tagger->process_data (
+ "<p>stuff</p>",
+ { _expr => 'stuff', _tag => 'a', href => 'http://example.com/foo.cgi?a=b&c=d' }
+ );
+
+ like ($text, qr|<p><a href="http://example\.com/foo\.cgi\?a=b&c=d">stuff</a></p>|);
+};
+
+TODO: {
+ local $TODO = 'Angle brackets double-escaped';
+ my $text = MKDoc::XML::Tagger->process_data (
+ "<p>stuff</p>",
+ { _expr => 'stuff', _tag => 'foo', bar => '<zzz>' }
+ );
+
+ like ($text, qr|<p><foo bar="<zzz>">stuff</foo></p>|);
+};
+
+1;
+
+__END__
More information about the MKDoc-commit
mailing list