|
@@ -48,12 +48,14 @@ class MrssFormat extends FormatAbstract {
|
|
EOD;
|
|
EOD;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $charset = $this->getCharset();
|
|
|
|
+
|
|
/* Data are prepared, now let's begin the "MAGIE !!!" */
|
|
/* Data are prepared, now let's begin the "MAGIE !!!" */
|
|
- $toReturn = '<?xml version="1.0" encoding="UTF-8"?>';
|
|
|
|
- $toReturn .= <<<EOD
|
|
|
|
-<rss version="2.0"
|
|
|
|
-xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
|
|
-xmlns:media="http://search.yahoo.com/mrss/"
|
|
|
|
|
|
+ $toReturn = <<<EOD
|
|
|
|
+<?xml version="1.0" encoding="{$charset}"?>
|
|
|
|
+<rss version="2.0"
|
|
|
|
+xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
|
|
+xmlns:media="http://search.yahoo.com/mrss/"
|
|
xmlns:atom="http://www.w3.org/2005/Atom">
|
|
xmlns:atom="http://www.w3.org/2005/Atom">
|
|
<channel>
|
|
<channel>
|
|
<title>{$title}</title>
|
|
<title>{$title}</title>
|
|
@@ -69,13 +71,13 @@ EOD;
|
|
|
|
|
|
// Remove invalid non-UTF8 characters
|
|
// Remove invalid non-UTF8 characters
|
|
ini_set('mbstring.substitute_character', 'none');
|
|
ini_set('mbstring.substitute_character', 'none');
|
|
- $toReturn = mb_convert_encoding($toReturn, 'UTF-8', 'UTF-8');
|
|
|
|
|
|
+ $toReturn = mb_convert_encoding($toReturn, $this->getCharset(), 'UTF-8');
|
|
return $toReturn;
|
|
return $toReturn;
|
|
}
|
|
}
|
|
|
|
|
|
public function display(){
|
|
public function display(){
|
|
$this
|
|
$this
|
|
- ->setContentType('application/rss+xml; charset=UTF-8')
|
|
|
|
|
|
+ ->setContentType('application/rss+xml; charset=' . $this->getCharset())
|
|
->callContentType();
|
|
->callContentType();
|
|
|
|
|
|
return parent::display();
|
|
return parent::display();
|