summaryrefslogtreecommitdiff
path: root/core/src/main/java
diff options
context:
space:
mode:
authorMartin Fietz <Martin.Fietz@gmail.com>2015-08-15 15:18:49 +0200
committerMartin Fietz <Martin.Fietz@gmail.com>2015-08-15 15:58:06 +0200
commitcf1259e0b312494dc328e45fd7074817337635dd (patch)
tree7f9112302eef20215462047cdffb0c6317b0a4c2 /core/src/main/java
parent928c438268ec4eab6f05bf2aa60f24e2d10156c1 (diff)
downloadAntennaPod-cf1259e0b312494dc328e45fd7074817337635dd.zip
Display line breaks in shownotes correctly
Diffstat (limited to 'core/src/main/java')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java
index f31297b41..77cf72ba8 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java
@@ -87,6 +87,9 @@ public class Timeline {
return "";
}
+ // ASCII line breaks to HTML line breaks
+ shownotes = shownotes.replace("\n", "<br />");
+
Document document = Jsoup.parse(shownotes);
// apply style
@@ -100,7 +103,7 @@ public class Timeline {
if (BuildConfig.DEBUG)
Log.d(TAG, "Recognized " + elementsWithTimeCodes.size() + " timecodes");
for (Element element : elementsWithTimeCodes) {
- Matcher matcherLong = TIMECODE_REGEX.matcher(element.text());
+ Matcher matcherLong = TIMECODE_REGEX.matcher(element.html());
StringBuffer buffer = new StringBuffer();
while (matcherLong.find()) {
String h = matcherLong.group(1);