]> git.lyx.org Git - features.git/commitdiff
Do not percent-encode & in urls
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 10 Mar 2019 12:23:36 +0000 (13:23 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 10 Mar 2019 12:23:36 +0000 (13:23 +0100)
This is query syntax

Fixes: #11511
follows up [c2db448ff5/lyxgit]

src/insets/InsetHyperlink.cpp

index 93dbaa94c576a8e6355583dddcd33ce89bf3692e..07185a425e56f98fa7a8b91f7b9f733127ff8d70 100644 (file)
@@ -133,8 +133,8 @@ 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;