mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
InsetHyperlink.cpp: the "#" character must not be escaped in the URL field, only in the name field
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28195 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
01d60968f9
commit
2a41c48394
@ -91,14 +91,6 @@ int InsetHyperlink::latex(odocstream & os, OutputParams const & runparams) const
|
||||
if (url[pos + 1] != '\\')
|
||||
url.replace(pos, 1, from_ascii("%5C"));
|
||||
}
|
||||
// "#" needs to be escapes to "\#", therefore the treatment
|
||||
// of "\" must be done before
|
||||
for (size_t i = 0, pos;
|
||||
(pos = url.find('#', i)) != string::npos;
|
||||
i = pos + 2) {
|
||||
if (url[pos + 1] != '\\')
|
||||
url.replace(pos, 1, from_ascii("\\#"));
|
||||
}
|
||||
|
||||
// add "http://" when the type is web (type = empty)
|
||||
// and no "://" or "run:" is given
|
||||
|
Loading…
Reference in New Issue
Block a user