summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2011-12-30 10:34:22 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-12-30 10:34:56 (GMT)
commitf99c17ef12c69990efb9eb18c1e83b91e07fe0ac (patch)
treee1619d38340e7e04324b53a81a9f47cc37fc02a5 /tools
parent5a669718e9cc0b22eb420eb77dd684e63158a398 (diff)
downloadQt-f99c17ef12c69990efb9eb18c1e83b91e07fe0ac.zip
Qt-f99c17ef12c69990efb9eb18c1e83b91e07fe0ac.tar.gz
Qt-f99c17ef12c69990efb9eb18c1e83b91e07fe0ac.tar.bz2
Add a default alt attribute to img tags.
The output HTML did not pass validation without a default alt attribute. Reviewed-by: Kevin Wright
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index bc84288..2a19681 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -759,6 +759,8 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<img src=\"" << protectEnc(fileName) << "\"";
if (!text.isEmpty())
out() << " alt=\"" << protectEnc(text) << "\"";
+ else
+ out() << " alt=\"\"";
out() << " />";
helpProjectWriter->addExtraFile(fileName);
if ((relative->type() == Node::Fake) &&