From: Juergen Spitzmueller Date: Sun, 10 Mar 2019 15:37:31 +0000 (+0100) Subject: More exceptions to percent encoding X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f28b531af7dea92e9739023b37a7db47bc0cc518;p=features.git More exceptions to percent encoding See #11511 --- diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index 07185a425e..a500f7bd59 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;