mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-08 18:19:42 +00:00
parent
3d08c83666
commit
3c83f01f1b
@ -133,8 +133,9 @@ void InsetHyperlink::latex(otexstream & os,
|
|||||||
if (!url.empty()) {
|
if (!url.empty()) {
|
||||||
// Use URI/URL-style percent-encoded string (hexadecimal).
|
// Use URI/URL-style percent-encoded string (hexadecimal).
|
||||||
// We exclude some characters that must not be transformed
|
// We exclude some characters that must not be transformed
|
||||||
// in hrefs (% # / : ? = &) or that we need to treat manually (\).
|
// in hrefs: % # / : ? = & ! * ' ( ) ; @ + $ , [ ]
|
||||||
url = to_percent_encoding(url, from_ascii("%#\\/:?=&"));
|
// or that we need to treat manually: \.
|
||||||
|
url = to_percent_encoding(url, from_ascii("%#\\/:?=&!*'();@+$,[]"));
|
||||||
// We handle \ manually since \\ is valid
|
// We handle \ manually since \\ is valid
|
||||||
for (size_t i = 0, pos;
|
for (size_t i = 0, pos;
|
||||||
(pos = url.find('\\', i)) != string::npos;
|
(pos = url.find('\\', i)) != string::npos;
|
||||||
|
Loading…
Reference in New Issue
Block a user