diff options
| author | 2012-10-24 18:22:40 +0200 | |
|---|---|---|
| committer | 2012-10-24 18:22:40 +0200 | |
| commit | 4924f4c6d6d03d39471de363b8d368c8edad8f3d (patch) | |
| tree | f91684622068e2baddbd12b7f20a7d712e095676 /lib/lib_rss.php | |
| parent | 2b3a08e3dd5bf936d6d76a5f5282933e3ca6aeea (diff) | |
Correction bugs + amélioration design
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 7d01a4a0f..2a8921da0 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -79,7 +79,7 @@ function opml_export ($cats) { $txt .= '<outline text="' . $cat['name'] . '">' . "\n"; foreach ($cat['feeds'] as $feed) { - $txt .= "\t" . '<outline text="' . $feed->name () . '" type="rss" xmlUrl="' . $feed->url () . '" htmlUrl="' . $feed->website () . '" />' . "\n"; + $txt .= "\t" . '<outline text="' . cleanText ($feed->name ()) . '" type="rss" xmlUrl="' . $feed->url () . '" htmlUrl="' . $feed->website () . '" />' . "\n"; } $txt .= '</outline>' . "\n"; @@ -88,6 +88,10 @@ function opml_export ($cats) { return $txt; } +function cleanText ($text) { + return preg_replace ('/&[\w]+;/', '', $text); +} + function opml_import ($xml) { $opml = @simplexml_load_string ($xml); |
