forked from blallo/rss-bridge
Merge pull request #96 from jdesgats/master
Fixed HTML escaping for Atom items
This commit is contained in:
commit
5f64a2531d
1 changed files with 5 additions and 5 deletions
|
@ -22,10 +22,10 @@ class AtomFormat extends FormatAbstract{
|
|||
|
||||
$entries = '';
|
||||
foreach($this->getDatas() as $data){
|
||||
$entryName = is_null($data->name) ? $title : $data->name;
|
||||
$entryAuthor = is_null($data->author) ? $uri : $data->author;
|
||||
$entryTitle = is_null($data->title) ? '' : $data->title;
|
||||
$entryUri = is_null($data->uri) ? '' : $data->uri;
|
||||
$entryName = htmlspecialchars(is_null($data->name) ? $title : $data->name);
|
||||
$entryAuthor = htmlspecialchars(is_null($data->author) ? $uri : $data->author);
|
||||
$entryTitle = htmlspecialchars(is_null($data->title) ? '' : $data->title);
|
||||
$entryUri = htmlspecialchars(is_null($data->uri) ? '' : $data->uri);
|
||||
$entryTimestamp = is_null($data->timestamp) ? '' : date(DATE_ATOM, $data->timestamp);
|
||||
// We prevent content from closing the CDATA too early.
|
||||
$entryContent = is_null($data->content) ? '' : '<![CDATA[' . $this->sanitizeHtml(str_replace(']]>','',$data->content)) . ']]>';
|
||||
|
@ -92,4 +92,4 @@ EOD;
|
|||
|
||||
return parent::display();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue