[-] MO : block RSS encoding fixed #PSCFV-5689
This commit is contained in:
@@ -65,9 +65,9 @@ class Blockrss extends Module
|
||||
if (Tools::isSubmit('submitBlockRss'))
|
||||
{
|
||||
$errors = array();
|
||||
$urlfeed = strval(Tools::getValue('urlfeed'));
|
||||
$title = strval(Tools::getValue('title'));
|
||||
$nbr = (int)(Tools::getValue('nbr'));
|
||||
$urlfeed = Tools::getValue('urlfeed');
|
||||
$title = Tools::getValue('title');
|
||||
$nbr = (int)Tools::getValue('nbr');
|
||||
|
||||
if ($urlfeed AND !Validate::isUrl($urlfeed))
|
||||
$errors[] = $this->l('Invalid feed URL');
|
||||
@@ -82,13 +82,9 @@ class Blockrss extends Module
|
||||
/* Even if the feed was reachable, We need to make sure that the feed is well formated */
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
$xmlFeed = new XML_Feed_Parser($contents);
|
||||
|
||||
}
|
||||
catch (XML_Feed_Parser_Exception $e)
|
||||
{
|
||||
} catch (XML_Feed_Parser_Exception $e) {
|
||||
$errors[] = $this->l('Invalid feed:').' '.$e->getMessage();
|
||||
}
|
||||
}
|
||||
@@ -124,13 +120,13 @@ class Blockrss extends Module
|
||||
<fieldset><legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
|
||||
<label>'.$this->l('Block title').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="title" value="'.htmlentities(Tools::getValue('title', Configuration::get('RSS_FEED_TITLE'))).'" />
|
||||
<input type="text" name="title" value="'.Tools::safeOutput(Tools::getValue('title', Configuration::get('RSS_FEED_TITLE'))).'" />
|
||||
<p class="clear">'.$this->l('Create a title for the block (default: \'RSS feed\')').'</p>
|
||||
|
||||
</div>
|
||||
<label>'.$this->l('Add a feed URL').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="85" name="urlfeed" value="'.htmlentities(Tools::getValue('urlfeed', Configuration::get('RSS_FEED_URL'))).'" />
|
||||
<input type="text" size="85" name="urlfeed" value="'.Tools::safeOutput(Tools::getValue('urlfeed', Configuration::get('RSS_FEED_URL'))).'" />
|
||||
<p class="clear">'.$this->l('Add the URL of the feed you want to use (sample: http://news.google.com/?output=rss)').'</p>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user