summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2010-09-06 12:58:43 +1000
committerJason McDonald <jason.mcdonald@nokia.com>2010-09-06 12:58:43 +1000
commit6272b259e0ed457885929367c912bb8ffcd46096 (patch)
treec0d54ca4a072debc12afb94548098bcdcc7dfc9c
parent4277b47fb025935bc3723305482d5e755227c9ae (diff)
qdoc: Fixed non-well-formed markup.
Reviewed-by: Trust Me To-be-really-reviewed-by: Qt Doc Team (cherry picked from commit 3833dc0a0535fa8320e17c741ca2746e9bebcaa9) Conflicts: tools/qdoc3/htmlgenerator.cpp
-rw-r--r--tools/qdoc3/htmlgenerator.cpp22
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf3
2 files changed, 13 insertions, 12 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index ed44a34af5..e52ec535ed 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1720,7 +1720,7 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
out() << "</li>\n";
}
if (!cn->name().isEmpty())
- out() << " <li>" << cn->name() << "</li>\n";
+ out() << " <li>" << protect(cn->name()) << "</li>\n";
}
else if (node->type() == Node::Fake) {
const FakeNode* fn = static_cast<const FakeNode*>(node);
@@ -1728,52 +1728,52 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
out() << " <li><a href=\"modules.html\">Modules</a></li>";
QString name = node->name();
if (!name.isEmpty())
- out() << " <li>" << name << "</li>\n";
+ out() << " <li>" << protect(name) << "</li>\n";
}
else if (node->subType() == Node::Group) {
if (fn->name() == QString("modules"))
out() << " <li>Modules</li>";
else {
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protect(title) << "</li>";
}
}
else if (node->subType() == Node::Page) {
if (fn->name() == QString("qdeclarativeexamples.html")) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>QML Examples & Demos</li>";
+ out() << " <li>QML Examples &amp; Demos</li>";
}
else if (fn->name().startsWith("examples-")) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protect(title) << "</li>";
}
else if (fn->name() == QString("namespaces.html")) {
out() << " <li>Namespaces</li>";
}
else {
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protect(title) << "</li>";
}
}
else if (node->subType() == Node::QmlClass) {
out() << " <li><a href=\"qdeclarativeelements.html\">QML Elements</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protect(title) << "</li>";
}
else if (node->subType() == Node::Example) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
QStringList sl = fn->name().split('/');
if (sl.contains("declarative"))
- out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples & Demos</a></li>";
+ out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples &amp; Demos</a></li>";
else {
- QString name = "examples-" + sl.at(0) + ".html";
+ QString name = protect("examples-" + sl.at(0) + ".html"); // this generates an empty link
QString t = CodeParser::titleFromName(name);
out() << " <li><a href=\"" << name << "\">"
<< t << "</a></li>";
}
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protect(title) << "</li>";
}
}
else if (node->type() == Node::Namespace) {
out() << " <li><a href=\"namespaces.html\">Namespaces</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protect(title) << "</li>";
}
}
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index cda1786010..933c8d0d1d 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -165,4 +165,5 @@ HTML.footer = " <!-- /div -->\n" \
" </form>\n" \
" </div>\n" \
" <div id=\"blurpage\">\n" \
- " </div>\n"
+ " </div>\n" \
+ " </div>\n"