diff options
author | malockin <malockin@gmail.com> | 2020-05-24 08:13:27 +0300 |
---|---|---|
committer | malockin <malockin@gmail.com> | 2020-05-24 08:13:27 +0300 |
commit | cc98447af95faf7f5d44130069edd0dbeeb2ae8c (patch) | |
tree | dd7aab30b6ba34f59c0b47b25479e1ea7c8f4fa7 /core/src/main | |
parent | 35dde1fadbd2bfa70ab96c09e8bd332aa9768cd9 (diff) | |
download | AntennaPod-cc98447af95faf7f5d44130069edd0dbeeb2ae8c.zip |
Use replace instread of replaceAll & fix typo
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/assets/html-export-favorites-item-template.html (renamed from core/src/main/assets/html-export-fatorites-item-template.html) | 0 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java | 16 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/src/main/assets/html-export-fatorites-item-template.html b/core/src/main/assets/html-export-favorites-item-template.html index 83f06a458..83f06a458 100644 --- a/core/src/main/assets/html-export-fatorites-item-template.html +++ b/core/src/main/assets/html-export-favorites-item-template.html diff --git a/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java b/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java index 914faca05..60c38a391 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java @@ -25,7 +25,7 @@ public class FavoritesWriter implements ExportWriter { private static final int PAGE_LIMIT = 100; - private static final String FAVORITE_TEMPLATE = "html-export-fatorites-item-template.html"; + private static final String FAVORITE_TEMPLATE = "html-export-favorites-item-template.html"; private static final String FEED_TEMPLATE = "html-export-feed-template.html"; private static final String UTF_8 = "UTF-8"; @@ -108,19 +108,19 @@ public class FavoritesWriter implements ExportWriter { private void writeFeed(Writer writer, Feed feed, String feedTemplate) throws IOException { String feedInfo = feedTemplate - .replaceAll("\\{FEED_IMG\\}", feed.getImageUrl()) - .replaceAll("\\{FEED_TITLE\\}", feed.getTitle()) - .replaceAll("\\{FEED_LINK\\}", feed.getLink()) - .replaceAll("\\{FEED_WEBSITE\\}", feed.getDownload_url()); + .replace("{FEED_IMG}", feed.getImageUrl()) + .replace("{FEED_TITLE}", feed.getTitle()) + .replace("{FEED_LINK}", feed.getLink()) + .replace("{FEED_WEBSITE}", feed.getDownload_url()); writer.append(feedInfo); } private void writeFavoriteItem(Writer writer, FeedItem item, String favoriteTemplate) throws IOException { String favItem = favoriteTemplate - .replaceAll("\\{FAV_TITLE\\}", item.getTitle().trim()) - .replaceAll("\\{FAV_WEBSITE\\}", item.getLink()) - .replaceAll("\\{FAV_MEDIA\\}", item.getMedia().getDownload_url()); + .replace("{FAV_TITLE}", item.getTitle().trim()) + .replace("{FAV_WEBSITE}", item.getLink()) + .replace("{FAV_MEDIA}", item.getMedia().getDownload_url()); writer.append(favItem); } |