]> 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)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:16 +0000 (15:48 +0200)
See #11511

src/insets/InsetHyperlink.cpp

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;