summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-05-06 12:30:18 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-05-06 12:30:18 (GMT)
commit23c13fc17365dca77acbe9a992e03ae4a40f6eca (patch)
treecfc812b095178411db5aae564fc43cac8b714078 /src/dot.cpp
parent124b4621e793d9ffa3eca3ee91cdb6ded37c553e (diff)
downloadDoxygen-23c13fc17365dca77acbe9a992e03ae4a40f6eca.zip
Doxygen-23c13fc17365dca77acbe9a992e03ae4a40f6eca.tar.gz
Doxygen-23c13fc17365dca77acbe9a992e03ae4a40f6eca.tar.bz2
Release-1.5.2-20070506
Diffstat (limited to 'src/dot.cpp')
-rw-r--r--src/dot.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 651b6c9..808dcca 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -694,6 +694,24 @@ static QCString convertLabel(const QCString &l)
return result;
}
+static QCString escapeTooltip(const QCString &tooltip)
+{
+ QCString result;
+ const char *p=tooltip.data();
+ if (p==0) return result;
+ char c;
+ while ((c=*p++))
+ {
+ switch(c)
+ {
+ case '\\': result+="\\\\"; break;
+ case '"': result+="\\\""; break;
+ default: result+=c; break;
+ }
+ }
+ return result;
+}
+
static void writeBoxMemberList(QTextStream &t,char prot,MemberList *ml,ClassDef *scope)
{
if (ml)
@@ -812,7 +830,7 @@ void DotNode::writeBox(QTextStream &t,
}
if (!m_tooltip.isEmpty())
{
- t << ",tooltip=\"" << m_tooltip << "\"";
+ t << ",tooltip=\"" << escapeTooltip(m_tooltip) << "\"";
}
}
t << "];" << endl;