Skip to content

Commit

Permalink
issue #6708 Invalid UTF-8 characters in hover title
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
albert-github committed Dec 31, 2018
1 parent 1ef6dd1 commit c40e1ea
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/dot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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;
}
}
}
}
Expand Down

0 comments on commit c40e1ea

Please sign in to comment.