diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2007-05-06 12:30:18 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2007-05-06 12:30:18 (GMT) |
commit | 23c13fc17365dca77acbe9a992e03ae4a40f6eca (patch) | |
tree | cfc812b095178411db5aae564fc43cac8b714078 /src/dot.cpp | |
parent | 124b4621e793d9ffa3eca3ee91cdb6ded37c553e (diff) | |
download | Doxygen-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.cpp | 20 |
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; |