From e40b8afa2aef5e42f24bed7f82922230f56aa02a Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 8 Jul 2019 15:24:08 +0200 Subject: issue #7110 URL Encoding for Hyperlinks in PDF For an URL also the percentage (`%`)sign has to be escaped --- src/latexgen.cpp | 2 +- src/util.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 6864e74..182583f 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -1381,7 +1381,7 @@ void LatexGenerator::startHtmlLink(const char *url) if (Config_getBool(PDF_HYPERLINKS)) { t << "\\href{"; - t << url; + t << latexFilterURL(url); t << "}"; } t << "{\\texttt{ "; diff --git a/src/util.cpp b/src/util.cpp index e5b9c5c..7107e83 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7082,6 +7082,7 @@ QCString latexFilterURL(const char *s) switch (c) { case '#': t << "\\#"; break; + case '%': t << "\\%"; break; default: t << c; break; -- cgit v0.12