summaryrefslogtreecommitdiffstats
path: root/src/htmlgen.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-12-03 10:27:09 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-12-03 10:27:09 (GMT)
commit400de444ef9b0569b2803dc4a8e5497c181384ce (patch)
tree41f8e46b170e4b93fd477fe9bc9db55ee0013020 /src/htmlgen.cpp
parentd33a129d784f2b0f823f14a008e929513b302ad3 (diff)
downloadDoxygen-400de444ef9b0569b2803dc4a8e5497c181384ce.zip
Doxygen-400de444ef9b0569b2803dc4a8e5497c181384ce.tar.gz
Doxygen-400de444ef9b0569b2803dc4a8e5497c181384ce.tar.bz2
Incorrect tag sequence possible for images possible in case of xhtml
Message: `< Element map content does not follow the DTD, expecting ((p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | menu | dir | pre | hr | blockquote | address | center | noframes | isindex | fieldset | table | form | noscript | ins | del | script)+ | area+), got (area area div)` The problem first surfaced with test 11 (empty map tag), but the solution given at that moment (`<div/>)`) did work for test 11, but was not correct for test 27. Problem can be seen with the default doxygen test 27 (`[027_extends.c]: test the \extends, \implements, \memberof, \private, and \public commands`).
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r--src/htmlgen.cpp35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 357c048..efd2108 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1384,21 +1384,34 @@ void HtmlGenerator::startClassDiagram()
void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
const char *fileName,const char *name)
{
+ QGString result;
+ FTextStream tt(&result);
+
endSectionHeader(t);
startSectionSummary(t,m_sectionCount);
endSectionSummary(t);
startSectionContent(t,m_sectionCount);
- t << " <div class=\"center\">" << endl;
- t << " <img src=\"";
- t << relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
- t << "_map\" alt=\"\"/>" << endl;
- t << " <map id=\"" << convertToId(name);
- t << "_map\" name=\"" << convertToId(name);
- t << "_map\">" << endl;
-
- d.writeImage(t,dir,relPath,fileName);
- t << "<div/></map>" << endl;
- t << " </div>";
+ d.writeImage(tt,dir,relPath,fileName);
+ if (!result.isEmpty())
+ {
+ t << " <div class=\"center\">" << endl;
+ t << " <img src=\"";
+ t << relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
+ t << "_map\" alt=\"\"/>" << endl;
+ t << " <map id=\"" << convertToId(name);
+ t << "_map\" name=\"" << convertToId(name);
+ t << "_map\">" << endl;
+ t << result;
+ t << " </map>" << endl;
+ t << "</div>";
+ }
+ else
+ {
+ t << " <div class=\"center\">" << endl;
+ t << " <img src=\"";
+ t << relPath << fileName << ".png\" alt=\"\"/>" << endl;
+ t << " </div>";
+ }
endSectionContent(t);
m_sectionCount++;
}