From 400de444ef9b0569b2803dc4a8e5497c181384ce Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 3 Dec 2018 11:27:09 +0100 Subject: 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 (`
)`) 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`). --- src/context.cpp | 31 +++++++++++++++++++++++-------- src/dot.cpp | 29 ++++++++++++++++++++--------- src/htmlgen.cpp | 35 ++++++++++++++++++++++++----------- src/msc.cpp | 13 ++++++++++--- 4 files changed, 77 insertions(+), 31 deletions(-) diff --git a/src/context.cpp b/src/context.cpp index b05ee9f..6b5d2ac 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -2001,17 +2001,32 @@ class ClassContext::Private : public DefinitionContext { case ContextOutputFormat_Html: { + QGString result; + FTextStream tt(&result); + QCString name = convertToHtml(m_classDef->displayName()); - t << "
" << endl; - t << "getOutputFileBase(); - t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>" << endl; - t << "" << endl; - d.writeImage(t,g_globals.outputDir, + d.writeImage(tt,g_globals.outputDir, relPathAsString(), m_classDef->getOutputFileBase()); - t << "
" << endl; - t << "
"; + if (!result.isEmpty()) + { + t << "
" << endl; + t << " getOutputFileBase(); + t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>" << endl; + t << " " << endl; + t << result; + t << " " << endl; + t << "
"; + } + else + { + t << "
" << endl; + t << " getOutputFileBase(); + t << ".png\" alt=\"\"/>" << endl; + t << "
"; + } } break; case ContextOutputFormat_Latex: diff --git a/src/dot.cpp b/src/dot.cpp index d82ffa8..dd34411 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1108,12 +1108,18 @@ bool DotFilePatcher::run() int n = sscanf(line.data()+i,"