]> git.lyx.org Git - features.git/commitdiff
More exceptions to percent encoding
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 10 Mar 2019 15:37:31 +0000 (16:37 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 10 Mar 2019 17:04:03 +0000 (18:04 +0100)
See #11511

(cherry picked from commit 3c83f01f1b8b76b63a8f4892bb7635817ed1e12c)

src/insets/InsetHyperlink.cpp
status.23x

index 07185a425e56f98fa7a8b91f7b9f733127ff8d70..a500f7bd5913b35d7ea54c226e56826af4eeab9e 100644 (file)
@@ -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;
index 5243604d9fe650579b0a56461af19844bedd9dbf..0d2e1370803e3142b78dd083d5e97ed4753d96b7 100644 (file)
@@ -87,7 +87,7 @@ What's new
 
 - Fix paragraph alignment in RTL when using polyglossia (bidi) (bug 11399).
 
-- Fix LaTeX export of query strings in Hyperlinks (bug 11482).
+- Fix LaTeX export of query strings in Hyperlinks (bugs 11482, 11511).
 
 - Fix breakage caused by commas in the caption of listings (bug 11484).