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:
Uwe Stöhr 2009-01-17 05:24:05 +00:00
parent 01d60968f9
commit 2a41c48394

View File

@ -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