summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2014-07-07 21:01:37 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2014-07-07 21:01:37 +0200
commit74294bad557e7079dac30b45853cba1271046d6f (patch)
treeb2352746711a3b1237778b6c0c7ea5ecd6a804ee /src/de/danoeh/antennapod
parentf59623bb94bd338ddf59e39373f5ab50f9118216 (diff)
downloadAntennaPod-74294bad557e7079dac30b45853cba1271046d6f.zip
Remove leading and trailing whitespace in URLChecker. fixes #461
Diffstat (limited to 'src/de/danoeh/antennapod')
-rw-r--r--src/de/danoeh/antennapod/util/URLChecker.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/util/URLChecker.java b/src/de/danoeh/antennapod/util/URLChecker.java
index af0226ce0..9997daaf7 100644
--- a/src/de/danoeh/antennapod/util/URLChecker.java
+++ b/src/de/danoeh/antennapod/util/URLChecker.java
@@ -1,6 +1,9 @@
package de.danoeh.antennapod.util;
import android.util.Log;
+
+import org.apache.commons.lang3.StringUtils;
+
import de.danoeh.antennapod.BuildConfig;
/**
@@ -27,6 +30,7 @@ public final class URLChecker {
*/
public static String prepareURL(String url) {
StringBuilder builder = new StringBuilder();
+ url = StringUtils.trim(url);
if (url.startsWith("feed://")) {
if (BuildConfig.DEBUG) Log.d(TAG, "Replacing feed:// with http://");
url = url.replaceFirst("feed://", "http://");