Subject: | Contents of X<> tags are not properly escaped (patch attached) |
The contents of X<> tags are not escaped in any way. Indexing terms
that include less-than, greater-than, or ampersand characters may result
in broken SGML.
A patch for this problem is attached, along with a modification to an
existing test to ensure correct operation.
Subject: | x.patch |
--- lib/Pod/DocBook.pm 31 Jan 2006 01:20:06 -0000 1.5
+++ lib/Pod/DocBook.pm 19 Jul 2006 02:23:00 -0000 1.7
@@ -417,7 +417,7 @@
}
elsif ($command eq 'X') {
- $string = "<indexterm><primary>$argument</primary></indexterm>";
+ $string = "<indexterm><primary><![CDATA[$argument]]></primary></indexterm>";
}
elsif ($command eq 'Z') {
Index: t/formatting_codes.sgml
===================================================================
RCS file: /var/cvs/pod-docbook/t/formatting_codes.sgml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- t/formatting_codes.sgml 28 Sep 2005 01:54:19 -0000 1.1.1.1
+++ t/formatting_codes.sgml 19 Jul 2006 02:23:00 -0000 1.2
@@ -72,6 +72,6 @@
<filename>filename</filename>
</para>
<para>
- <indexterm><primary>topic name</primary></indexterm>
+ <indexterm><primary><![CDATA[topic name]]></primary></indexterm>
</para>
</section>