summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2007-05-06 12:30:18 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2007-05-06 12:30:18 (GMT)
commit0b087b99d43fb3803b26407d771ca32e6cf5c34b (patch)
treecfc812b095178411db5aae564fc43cac8b714078 /src/dot.cpp
parent80f45b6274c81f9cfd1772e5039005124ae04fab (diff)
downloadDoxygen-0b087b99d43fb3803b26407d771ca32e6cf5c34b.zip
Doxygen-0b087b99d43fb3803b26407d771ca32e6cf5c34b.tar.gz
Doxygen-0b087b99d43fb3803b26407d771ca32e6cf5c34b.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;