summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-12-31 14:40:20 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-12-31 14:40:20 (GMT)
commitc40e1ea9039c3161ae201b10489a62feb2d77880 (patch)
tree8970d5f5d07b704f3b03f6c816bf0ad143c7fe45 /src/dot.cpp
parent1ef6dd1d4accefe87d0941a429eef5f1fdb9cf73 (diff)
downloadDoxygen-c40e1ea9039c3161ae201b10489a62feb2d77880.zip
Doxygen-c40e1ea9039c3161ae201b10489a62feb2d77880.tar.gz
Doxygen-c40e1ea9039c3161ae201b10489a62feb2d77880.tar.bz2
issue #6708 Invalid UTF-8 characters in hover title
The replace function has as side effect that it affect UTF-8 characters as well. Removing `id="node[0-9]*"` no by searching its start and end.
Diffstat (limited to 'src/dot.cpp')
-rw-r--r--src/dot.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 0944a02..3853487 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -377,7 +377,6 @@ static bool convertMapFile(FTextStream &t,const char *mapName,
const QCString &context=QCString())
{
QFile f(mapName);
- static QRegExp re("id=\"node[0-9]*\"");
if (!f.open(IO_ReadOnly))
{
err("problems opening map file %s for inclusion in the docs!\n"
@@ -396,7 +395,17 @@ static bool convertMapFile(FTextStream &t,const char *mapName,
if (buf.left(5)=="<area")
{
- t << replaceRef(buf,relPath,urlOnly,context).replace(re,"");
+ QCString replBuf = replaceRef(buf,relPath,urlOnly,context);
+ int indexS = replBuf.find("id=\""), indexE;
+ indexE=replBuf.find('"',indexS+4);
+ if (indexS>=0 && (indexE=buf.find('"',indexS))!=-1)
+ {
+ t << replBuf.left(indexS-1) << replBuf.right(replBuf.length() - indexE - 1);
+ }
+ else
+ {
+ t << replBuf;
+ }
}
}
}