commit 3c83f01f1b8b76b63a8f4892bb7635817ed1e12c
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Mar 10 16:37:31 2019 +0100
More exceptions to percent encoding
See #11511
---
src/insets/InsetHyperlink.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp
index 07185a4..a500f7b 100644
--- a/src/insets/InsetHyperlink.cpp
+++ b/src/insets/InsetHyperlink.cpp
@@ -133,8 +133,9 @@ void InsetHyperlink::latex(otexstream & os,
if (!url.empty()) {
// Use URI/URL-style percent-encoded string (hexadecimal).
// We exclude some characters that must not be transformed
- // in hrefs (% # / : ? = &) or that we need to treat manually
(\).
- url = to_percent_encoding(url, from_ascii("%#\\/:?=&"));
+ // in hrefs: % # / : ? = & ! * ' ( ) ; @ + $ , [ ]
+ // or that we need to treat manually: \.
+ url = to_percent_encoding(url,
from_ascii("%#\\/:?=&!*'();@+$,[]"));
// We handle \ manually since \\ is valid
for (size_t i = 0, pos;
(pos = url.find('\\', i)) != string::npos;