Skip to content

Commit

Permalink
More fixes for RSS and non XML entities lie &eacute. Run text through
Browse files Browse the repository at this point in the history
html_entity_decode before feeding to htmlspecialchars.
  • Loading branch information
cheesegrits committed Dec 18, 2015
1 parent 51e0026 commit 408d7e9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/joomla/document/fabrikfeed/renderer/rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,14 @@ public function render($name, $params = null, $content = null)

for ($i = 0; $i < count($data->items); $i++)
{
/**
* Run text through html_entity_decode before htmlspecialchars, in case it contains non XML entities like &eacute
*/

$feed.= " <item>\n";
$feed.= " <title><![CDATA[" . htmlspecialchars(strip_tags($data->items[$i]->title), ENT_COMPAT, 'UTF-8') . "]]></title>\n";
$feed.= " <title><![CDATA[" . htmlspecialchars(strip_tags(html_entity_decode($data->items[$i]->title, ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8') . "]]></title>\n";
$feed.= " <link>" . $url . $data->items[$i]->link . "</link>\n";
$feed.= " <description><![CDATA[" . htmlspecialchars($this->_relToAbs($data->items[$i]->description), ENT_COMPAT, 'UTF-8') . "]]></description>\n";
$feed.= " <description><![CDATA[" . htmlspecialchars(html_entity_decode($this->_relToAbs($data->items[$i]->description), ENT_COMPAT, 'UTF-8'), ENT_COMPAT, 'UTF-8') . "]]></description>\n";

if ($data->items[$i]->author != "")
{
Expand Down

0 comments on commit 408d7e9

Please sign in to comment.