diff --git a/bl-plugins/rss/plugin.php b/bl-plugins/rss/plugin.php index 207dafe5..a7a1d3d9 100644 --- a/bl-plugins/rss/plugin.php +++ b/bl-plugins/rss/plugin.php @@ -32,6 +32,11 @@ class pluginRSS extends Plugin { return $html; } + + private function urlRSS($url) + { + return preg_replace_callback('/[^\x20-\x7f]/', function($match) { return urlencode($match[0]); }, $url); + } private function createXML() { @@ -54,10 +59,11 @@ class pluginRSS extends Plugin { ); $xml = ''; - $xml .= ''; + $xml .= ''; $xml .= ''; + $xml .= ''; $xml .= ''.$site->title().''; - $xml .= ''.$site->url().''; + $xml .= ''.$this->urlRSS($site->url()).''; $xml .= ''.$site->description().''; $xml .= ''.date(DATE_RSS).''; @@ -68,7 +74,7 @@ class pluginRSS extends Plugin { $page = new Page($pageKey); $xml .= ''; $xml .= ''.$page->title().''; - $xml .= ''.$page->permalink().''; + $xml .= ''.$this->urlRSS($page->permalink()).''; $xml .= ''.Sanitize::html($page->contentBreak()).''; $xml .= ''.$page->date(DATE_RSS).''; $xml .= ''.$page->uuid().'';