From 2483bd1bba6c5d0d1d9443a965c417b52a4a54dd Mon Sep 17 00:00:00 2001 From: henrikjust Date: Wed, 20 Jul 2011 11:27:02 +0000 Subject: [PATCH] w2l bugfix: Correct treatment of URL decoded characters (%xy) in links git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@114 f0f2a975-2e09-46c8-9428-3b39399b9f3c --- source/distro/changelog.txt | 2 ++ source/java/writer2latex/latex/FieldConverter.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/distro/changelog.txt b/source/distro/changelog.txt index 7d6b920..4242b9c 100644 --- a/source/distro/changelog.txt +++ b/source/distro/changelog.txt @@ -2,6 +2,8 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2 ---------- version 1.1.8 ---------- +[w2l] Bugfix: No longer decodes URLs in links (hyperref.sty has no problem with sequences like %E4) + [w2x] EPUB bugfix: The meta data editor now shows the correct default creator (not the original creator) [w2x] New option cover_image with values true and false (default). In EPUB export, if this option is set the true the very diff --git a/source/java/writer2latex/latex/FieldConverter.java b/source/java/writer2latex/latex/FieldConverter.java index dd1669a..486e2d9 100644 --- a/source/java/writer2latex/latex/FieldConverter.java +++ b/source/java/writer2latex/latex/FieldConverter.java @@ -20,7 +20,7 @@ * * All Rights Reserved. * - * Version 1.2 (2011-02-01) + * Version 1.2 (2011-07-20) * */ @@ -845,12 +845,12 @@ public class FieldConverter extends ConverterHelper { if (ofr.getTextContent(node).trim().equals(sHref)) { // The link text equals the url ldp.append("\\url{") - .append(oc.isInFootnote() ? escapeHref(Misc.urlDecode(sHref)) : Misc.urlDecode(sHref)) + .append(oc.isInFootnote() ? escapeHref(sHref) : sHref) .append("}"); } else { ldp.append("\\href{") - .append(oc.isInFootnote() ? escapeHref(Misc.urlDecode(sHref)) : Misc.urlDecode(sHref)) + .append(oc.isInFootnote() ? escapeHref(sHref) : sHref) .append("}{"); // ignore text style (let hyperref.sty handle the decoration): palette.getInlineCv().traverseInlineText(node,ldp,oc);