summaryrefslogtreecommitdiffstats
path: root/src/context.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/context.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/context.cpp')
-rw-r--r--src/context.cpp31
1 files changed, 23 insertions, 8 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<ClassContext::Private>
{
case ContextOutputFormat_Html:
{
+ QGString result;
+ FTextStream tt(&result);
+
QCString name = convertToHtml(m_classDef->displayName());
- t << "<div class=\"center\">" << endl;
- t << "<img src=\"";
- t << relPathAsString() << m_classDef->getOutputFileBase();
- t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>" << endl;
- t << "<map id=\"" << convertToId(name) << "_map\" name=\"" << convertToId(name) << "_map\">" << endl;
- d.writeImage(t,g_globals.outputDir,
+ d.writeImage(tt,g_globals.outputDir,
relPathAsString(),
m_classDef->getOutputFileBase());
- t << "<div/></map>" << endl;
- t << "</div>";
+ if (!result.isEmpty())
+ {
+ t << "<div class=\"center\">" << endl;
+ t << " <img src=\"";
+ t << relPathAsString() << m_classDef->getOutputFileBase();
+ t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>" << endl;
+ t << " <map id=\"" << convertToId(name) << "_map\" name=\"" << convertToId(name) << "_map\">" << endl;
+ t << result;
+ t << " </map>" << endl;
+ t << "</div>";
+ }
+ else
+ {
+ t << "<div class=\"center\">" << endl;
+ t << " <img src=\"";
+ t << relPathAsString() << m_classDef->getOutputFileBase();
+ t << ".png\" alt=\"\"/>" << endl;
+ t << "</div>";
+ }
}
break;
case ContextOutputFormat_Latex: