summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-07-01 09:08:27 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-07-01 09:08:27 (GMT)
commit1de4faf17a4b5de11839220d95e08264303924c5 (patch)
treea6b554a5b828f8bc32a5388667d180f28fe93ab1
parent154e877cc2e8b10091d7e0068b6f6d5793cd29f3 (diff)
downloadDoxygen-1de4faf17a4b5de11839220d95e08264303924c5.zip
Doxygen-1de4faf17a4b5de11839220d95e08264303924c5.tar.gz
Doxygen-1de4faf17a4b5de11839220d95e08264303924c5.tar.bz2
Tooltip was twice 'HTML escaped'
The tooltip was already 'HTML escaped' except for some '<' and '>' characters but was again 'HTML escaped' resulting in e.g. that a single apostrophe (') was translated to &#39; and again to &amp#39; resulting in &#39; in the tooltip. Only '<' and '>' are now 'HTML escaped again'
-rw-r--r--src/htmlgen.cpp23
-rw-r--r--src/htmlgen.h1
2 files changed, 23 insertions, 1 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 740b2f5..8feb8b0 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -514,6 +514,27 @@ void HtmlCodeGenerator::docify(const char *str)
}
}
+void HtmlCodeGenerator::docify_tt(const char *str)
+{
+ m_t << getHtmlDirEmbedingChar(getTextDirByConfig(str));
+
+ if (str && m_streamSet)
+ {
+ const char *p=str;
+ char c;
+ while (*p)
+ {
+ c=*p++;
+ switch(c)
+ {
+ case '<': m_t << "&lt;"; break;
+ case '>': m_t << "&gt;"; break;
+ default: m_t << c;
+ }
+ }
+ }
+}
+
void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
const char *anchor,int l)
{
@@ -606,7 +627,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
if (desc)
{
m_t << "<div class=\"ttdoc\">";
- docify(desc); // desc is already HTML escaped; but there are still < and > signs
+ docify_tt(desc); // desc is already HTML escaped; but there are still < and > signs
m_t << "</div>";
}
if (!defInfo.file.isEmpty())
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 2d8d6e0..b80d7d4 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -61,6 +61,7 @@ class HtmlCodeGenerator : public CodeOutputInterface
const char *anchor,const char *name,
const char *tooltip);
void docify(const char *str);
+ void docify_tt(const char *str);
bool m_streamSet;
FTextStream m_t;
int m_col;