From 8295d3ffb8c112972fb13c2911b8a15e45498b6c Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 30 May 2013 22:13:37 +0200 Subject: Bug 700646 - XML output does not handle HTML entities in titles --- src/latexdocvisitor.cpp | 6 +++--- src/xmldocvisitor.cpp | 2 +- src/xmlgen.cpp | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 0a96530..25f8c46 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -142,9 +142,9 @@ void LatexDocVisitor::visit(DocSymbol *s) case DocSymbol::DoubleColon: m_t << "::"; break; case DocSymbol::Percent: m_t << "\\%"; break; case DocSymbol::Pipe: m_t << "$|$"; break; - case DocSymbol::Copy: m_t << "\\copyright"; break; - case DocSymbol::Tm: m_t << "\\texttrademark"; break; - case DocSymbol::Reg: m_t << "\\textregistered"; break; + case DocSymbol::Copy: m_t << "\\copyright{}"; break; + case DocSymbol::Tm: m_t << "\\texttrademark{}"; break; + case DocSymbol::Reg: m_t << "\\textregistered{}"; break; case DocSymbol::Apos: m_t << "'"; break; case DocSymbol::Quot: m_t << "\""; break; case DocSymbol::Lsquo: m_t << "`"; break; diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 5bae376..add18e3 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -587,7 +587,7 @@ void XmlDocVisitor::visitPre(DocSection *s) if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor(); m_t << "\">" << endl; m_t << ""; - filter(s->title()); + filter(convertCharEntitiesToUTF8(s->title())); m_t << "" << endl; } diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index b1bfc9c..f189831 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1838,20 +1838,22 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) QCString title; if (!pd->title().isEmpty() && pd->title().lower()!="notitle") { - title = filterTitle(Doxygen::mainPage->title()); + title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title())); } else { title = Config_getString("PROJECT_NAME"); } - t << " " << convertToXML(title) << "" << endl; + t << " " << convertToXML(convertCharEntitiesToUTF8(title)) + << "" << endl; } else { SectionInfo *si = Doxygen::sectionDict->find(pd->name()); if (si) { - t << " " << convertToXML(si->title) << "" << endl; + t << " " << convertToXML(convertCharEntitiesToUTF8(si->title)) + << "" << endl; } } writeInnerPages(pd->getSubPages(),t); -- cgit v0.12