summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--articleenhancer/xpatharticleenhancer.php2
-rw-r--r--fetcher/feedfetcher.php4
-rw-r--r--fetcher/log.txt1
-rw-r--r--templates/admin.php2
4 files changed, 6 insertions, 3 deletions
diff --git a/articleenhancer/xpatharticleenhancer.php b/articleenhancer/xpatharticleenhancer.php
index 8e45636d2..23af24893 100644
--- a/articleenhancer/xpatharticleenhancer.php
+++ b/articleenhancer/xpatharticleenhancer.php
@@ -53,7 +53,7 @@ class XPathArticleEnhancer implements ArticleEnhancer {
if(preg_match('/(?<=charset=)[^;]*/', $contentType, $matches)) {
$encoding = $matches[0];
$body = mb_convert_encoding($body, 'HTML-ENTITIES',
- $encoding);
+ strtoupper($encoding));
}
$dom = new DOMDocument();
diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php
index 7cd439669..4efe0215c 100644
--- a/fetcher/feedfetcher.php
+++ b/fetcher/feedfetcher.php
@@ -129,7 +129,9 @@ class FeedFetcher implements IFeedFetcher {
$item->setGuid($guid);
// purification is done in the service layer
- $item->setBody($parsedItem->getContent());
+ $body = $parsedItem->getContent();
+ $body = mb_convert_encoding($body, 'HTML-ENTITIES', 'UTF-8');
+ $item->setBody($body);
// pubdate is not required. if not given use the current date
$date = $parsedItem->getDate();
diff --git a/fetcher/log.txt b/fetcher/log.txt
new file mode 100644
index 000000000..30062d8fd
--- /dev/null
+++ b/fetcher/log.txt
@@ -0,0 +1 @@
+<table cellspacing="0" cellpadding="0"><tbody><tr><td align="left" valign="center"><a href="http://rss.rssad.jp/rss/ad/ba3Nv95leBaa/f7u9rcLoVu2k?type=2" target="_blank"><img alt="" style="border: 0;" border="0" src="http://rss.rssad.jp/rss/img/ba3Nv95leBaa/f7u9rcLoVu2k?type=2&ent=341f96df45164a66975206bad6eef4e5"/></a></td></tr><tr><td align="left" valign="top" > 政府開発援助の役割・意義、日本が行ってきた援助の成果や評価についてご紹介。 </td></tr></tbody></table><div style="font-size:10px;"><span style="padding-top:5px;"><br style="display:none"/><a href="http://www.fringe81.com/service/trendmatch.html">Ads by Trend Match</a></span><br/></div> \ No newline at end of file
diff --git a/templates/admin.php b/templates/admin.php
index a73bd2f51..ef4cb8625 100644
--- a/templates/admin.php
+++ b/templates/admin.php
@@ -9,7 +9,7 @@ style('news', 'admin');
<p><input type="checkbox" name="news-use-cron-updates"
<?php if ($_['useCronUpdates']) p('checked'); ?>>
<label for="news-use-cron-updates">
- <?php p($l->t('Use ownCloud cron to for updates')); ?>
+ <?php p($l->t('Use ownCloud cron for updates')); ?>
</label>
</p>
<p>