From c2db448ff558f53ebfd93920d7d40f37d9a4211c Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 29 Jan 2019 14:49:04 +0100 Subject: [PATCH] ? and = must not be percent-encoded in hrefs Fixes: #11482 --- src/insets/InsetHyperlink.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index aae07ce0da..93dbaa94c5 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -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;