summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristoph Lipka <c-lipka@users.noreply.github.com>2016-04-27 00:26:48 (GMT)
committerChristoph Lipka <c-lipka@users.noreply.github.com>2016-04-27 00:26:48 (GMT)
commit6136cf9e3ad70d58cac4d8022cce8c8729805119 (patch)
tree1795492a0631c2119e1253050efdc681b27372ea /src
parenta56e454d220a8cf669fd1278a048b7be2f276839 (diff)
downloadDoxygen-6136cf9e3ad70d58cac4d8022cce8c8729805119.zip
Doxygen-6136cf9e3ad70d58cac4d8022cce8c8729805119.tar.gz
Doxygen-6136cf9e3ad70d58cac4d8022cce8c8729805119.tar.bz2
Bug 765001 - Bad character escaping scheme in HTML anchor generation.
Diffstat (limited to 'src')
-rw-r--r--src/htmlhelp.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index d365744..9c60727 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -134,7 +134,17 @@ static QCString field2URL(const IndexField *f,bool checkReversed)
QCString result = f->url + Doxygen::htmlFileExtension;
if (!f->anchor.isEmpty() && (!checkReversed || f->reversed))
{
- result+="#"+f->anchor;
+ result+="#";
+ // HTML Help needs colons in link anchors to be escaped in the .hhk file.
+ int prev = 0;
+ int next;
+ while ((next=f->anchor.find(':', prev))!=-1)
+ {
+ result+=f->anchor.mid(prev,next-prev);
+ result+="%3A";
+ prev=next+1;
+ }
+ result+=f->anchor.mid(prev);
}
return result;
}