summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-08-24 08:56:38 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-08-24 08:56:38 (GMT)
commit1f849a16671e1c9afff4ee30a5b5a33d271e8684 (patch)
tree61a428413af2b6b0d89b3467d83365427f427b31 /src/util.cpp
parent94a52469b177703d3e0d94bed6c4a48bddba18cb (diff)
downloadDoxygen-1f849a16671e1c9afff4ee30a5b5a33d271e8684.zip
Doxygen-1f849a16671e1c9afff4ee30a5b5a33d271e8684.tar.gz
Doxygen-1f849a16671e1c9afff4ee30a5b5a33d271e8684.tar.bz2
Issue_6456 Using # in links causes errors in PDF generation
- The # sign in an URL needs to be escaped as longtabu reads the table body as the argument to a command, so the self-escaping mechanism of \href cannot work (from https://tex.stackexchange.com/questions/447461/having-a-hash-sign-in-href-in-a-longtabu-cell) - a regression regarding the change from `\tt` to `\texttt` (needed `{ ... }` as `\href` has 2 arguments )
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index b387a84..5fc8822 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6964,6 +6964,25 @@ QCString latexEscapePDFString(const char *s)
return result.data();
}
+QCString latexFilterURL(const char *s)
+{
+ QGString result;
+ FTextStream t(&result);
+ const char *p=s;
+ char c;
+ while ((c=*p++))
+ {
+ switch (c)
+ {
+ case '#': t << "\\#"; break;
+ default:
+ t << c;
+ break;
+ }
+ }
+ return result.data();
+}
+
QCString rtfFormatBmkStr(const char *name)
{