diff --git a/formats/AtomFormat.php b/formats/AtomFormat.php index 26badb8..991d5be 100644 --- a/formats/AtomFormat.php +++ b/formats/AtomFormat.php @@ -6,7 +6,6 @@ class AtomFormat extends FormatAbstract{ public function stringify(){ - /* Datas preparation */ $https = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : ''; $httpHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; $httpInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; @@ -42,16 +41,7 @@ class AtomFormat extends FormatAbstract{ EOD; } - /* - TODO : - - Security: Disable Javascript ? - - : Define new extra info ? - - : RFC look with xhtml, keep this in spite of ? - */ - -// #### TEMPORARY FIX ### -$feedTimestamp = date(DATE_ATOM, time()); -// ################ + $feedTimestamp = date(DATE_ATOM, time()); /* Data are prepared, now let's begin the "MAGIE !!!" */ $toReturn = ''; @@ -70,11 +60,6 @@ $feedTimestamp = date(DATE_ATOM, time()); EOD; // Remove invalid non-UTF8 characters - - // We cannot use iconv because of a bug in some versions of iconv. - // See http://www.php.net/manual/fr/function.iconv.php#108643 - //$toReturn = iconv("UTF-8", "UTF-8//IGNORE", $toReturn); - // So we use mb_convert_encoding instead: ini_set('mbstring.substitute_character', 'none'); $toReturn= mb_convert_encoding($toReturn, 'UTF-8', 'UTF-8'); return $toReturn; @@ -82,7 +67,7 @@ EOD; public function display(){ $this - ->setContentType('application/atom+xml; charset=UTF-8') // We force UTF-8 in ATOM output. + ->setContentType('application/atom+xml; charset=UTF-8') ->callContentType(); return parent::display(); diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php index 4a9aab0..f2f6e41 100644 --- a/formats/HtmlFormat.php +++ b/formats/HtmlFormat.php @@ -2,7 +2,6 @@ class HtmlFormat extends FormatAbstract{ public function stringify(){ - /* Datas preparation */ $extraInfos = $this->getExtraInfos(); $title = htmlspecialchars($extraInfos['name']); $uri = htmlspecialchars($extraInfos['uri']); diff --git a/formats/MrssFormat.php b/formats/MrssFormat.php index 498db3b..361d64a 100644 --- a/formats/MrssFormat.php +++ b/formats/MrssFormat.php @@ -6,7 +6,6 @@ class MrssFormat extends FormatAbstract{ public function stringify(){ - /* Datas preparation */ $https = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : ''; $httpHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; $httpInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; @@ -38,13 +37,6 @@ class MrssFormat extends FormatAbstract{ EOD; } - /* - TODO : - - Security: Disable Javascript ? - - : Define new extra info ? - - : RFC look with xhtml, keep this in spite of ? - */ - /* Data are prepared, now let's begin the "MAGIE !!!" */ $toReturn = ''; $toReturn .= <<setContentType('application/rss+xml; charset=UTF-8') // We force UTF-8 in RSS output. + ->setContentType('application/rss+xml; charset=UTF-8') ->callContentType(); return parent::display();