X-Git-Url: http://gitweb.fperrin.net/?p=DictionaryPC.git;a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2Fparser%2Fwiktionary%2FWholeSectionToHtmlParser.java;h=2b719db747b3b5f64edf4c8f938d333c9da04073;hp=2c85d85242cc1b25e4dbc54511ba3eba6970637f;hb=cd527412992b58b660a003862da6009f6122c162;hpb=e833b97f330ba8597c81e5caa9685e8a8b5d5ae9 diff --git a/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java b/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java index 2c85d85..2b719db 100644 --- a/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java +++ b/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java @@ -344,14 +344,13 @@ public class WholeSectionToHtmlParser extends AbstractWiktionaryParser { if (webUrlTemplate != null) { final String webUrl = String.format(webUrlTemplate, title); - boolean success = true; + String asciiWebUrl = null; // URI.create can raise an exception e.g. if webUrl contains %, just ignore those cases. try { - String asciiWebUrl = URI.create(webUrl).toASCIIString(); + asciiWebUrl = URI.create(webUrl).toASCIIString(); } catch (Exception e) { - success = false; } - if (success) { + if (asciiWebUrl != null) { callback.builder.append("

");