Skip to content

Commit

Permalink
Incorrect tag sequence for xhtml with class diagram possible
Browse files Browse the repository at this point in the history
In case of a class diagram without mapping information the `map` tag is written without content. This is not allowed and results in xhtml (as reported by xmllint) in:
`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 ()`
By adding a dummy 'paragraph' `<div/>` this can be overcome,
The closing tag for `map` has been placed on a bit a more logical place, showing the open and close tag together.
Problem can be seen with the default doxygen test 11 (`[011_category.m]: test the \interface and \category command`).
  • Loading branch information
albert-github committed Nov 26, 2018
1 parent 01a8fb0 commit 2bcda33
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2010,6 +2010,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
d.writeImage(t,g_globals.outputDir,
relPathAsString(),
m_classDef->getOutputFileBase());
t << "<div/></map>" << endl;
t << "</div>";
}
break;
Expand Down
2 changes: 0 additions & 2 deletions src/diagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,5 @@ void ClassDiagram::writeImage(FTextStream &t,const char *path,
#define IMAGE_EXT ".png"
image.save((QCString)path+"/"+fileName+IMAGE_EXT);
Doxygen::indexList->addImageFile(QCString(fileName)+IMAGE_EXT);

if (generateMap) t << "</map>" << endl;
}

1 change: 1 addition & 0 deletions src/htmlgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,7 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
t << "_map\">" << endl;

d.writeImage(t,dir,relPath,fileName);
t << "<div/></map>" << endl;
t << " </div>";
endSectionContent(t);
m_sectionCount++;
Expand Down

0 comments on commit 2bcda33

Please sign in to comment.