w2l bugfix: Correct treatment of URL decoded characters (%xy) in links - now also in footnotes

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@117 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2011-07-22 10:06:19 +00:00
parent c2ce12b09e
commit c9152ed6a6

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2011-07-20) * Version 1.2 (2011-07-22)
* *
*/ */
@ -939,11 +939,12 @@ public class FieldConverter extends ConverterHelper {
return ", "+sName+"="+palette.getI18n().convert(sValue,false,palette.getMainContext().getLang()); return ", "+sName+"="+palette.getI18n().convert(sValue,false,palette.getMainContext().getLang());
} }
// For href within footnote, we have to escape the # // For href within footnote, we have to escape the # and % characters
private String escapeHref(String s) { private String escapeHref(String s) {
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
for (int i=0; i<s.length(); i++) { for (int i=0; i<s.length(); i++) {
if (s.charAt(i)=='#') { buf.append("\\#"); } if (s.charAt(i)=='#') { buf.append("\\#"); }
if (s.charAt(i)=='%') { buf.append("\\%"); }
else { buf.append(s.charAt(i)); } else { buf.append(s.charAt(i)); }
} }
return buf.toString(); return buf.toString();