summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-05-25 13:53:19 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-05-25 13:53:19 (GMT)
commitce9d2a52fc03df9fa892eede140bf738651a0984 (patch)
tree3e06900bf3e79081885be42c660778c080411614
parent456fe6c12cd9e23848b635d5e4639a51a6276e58 (diff)
downloadDoxygen-ce9d2a52fc03df9fa892eede140bf738651a0984.zip
Doxygen-ce9d2a52fc03df9fa892eede140bf738651a0984.tar.gz
Doxygen-ce9d2a52fc03df9fa892eede140bf738651a0984.tar.bz2
Bug 700710 - Docbook output produces invalid XML for <programlisting> elements
-rw-r--r--src/docbookgen.cpp40
1 files changed, 38 insertions, 2 deletions
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index 5726b3e..3c81eda 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -1171,7 +1171,27 @@ static void generateDocbookForClass(ClassDef *cd,FTextStream &ti)
{
t << "<link linkend=\"" << ii->fileDef->getOutputFileBase() << "\">";
}
- t << "&lt;" << nm << "&gt;" << "</link>";
+ if (ii->local)
+ {
+ t << "&quot;";
+ }
+ else
+ {
+ t << "&lt;";
+ }
+ t << convertToXML(nm);
+ if (ii->local)
+ {
+ t << "&quot;";
+ }
+ else
+ {
+ t << "&gt;";
+ }
+ if (ii->fileDef && !ii->fileDef->isReference())
+ {
+ t << "</link>";
+ }
t << "</programlisting>" << endl;
t << "</para>" << endl;
}
@@ -1389,7 +1409,23 @@ static void generateDocbookForFile(FileDef *fd,FTextStream &ti)
for (ili1.toFirst();(inc=ili1.current());++ili1)
{
t << " <programlisting>#include ";
- t << inc->includeName;
+ if (inc->local)
+ {
+ t << "&quot;";
+ }
+ else
+ {
+ t << "&lt;";
+ }
+ t << convertToXML(inc->includeName);
+ if (inc->local)
+ {
+ t << "&quot;";
+ }
+ else
+ {
+ t << "&gt;";
+ }
t << "</programlisting>" << endl;
}
}