diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index 25e5a8ad2..7c892c339 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -1955,20 +1955,24 @@ class e_parse extends e_parser
* @param boolean $tags [optional]
* @return string
*/
- function toRss($text, $tags = FALSE)
+ function toRss($text, $tags = false)
{
- if($tags != TRUE)
+ if($tags != true)
{
- $text = $this -> toHTML($text, TRUE);
+ $text = $this -> toHTML($text, true);
$text = strip_tags($text);
}
$text = $this->toEmail($text);
- $search = array("'", "$", "'", "$"," & ", e_BASE, "href='request.php");
- $replace = array("'", '$', "'", '$',' & ', SITEURL, "href='".SITEURL."request.php" );
+ $search = array("'", "$", "'", "$", e_BASE, "href='request.php");
+ $replace = array("'", '$', "'", '$', SITEURL, "href='".SITEURL."request.php" );
$text = str_replace($search, $replace, $text);
- if($tags == TRUE && ($text))
+ // Fix any left-over '&'
+ $text = str_replace('&', '&', $text); //first revert any previously converted.
+ $text = str_replace('&', '&', $text);
+
+ if($tags == true && ($text))
{
$text = "";
}
@@ -3451,6 +3455,10 @@ TMPL;
echo "
User-input ≫ toEmail(\$text) from DB
";
print_a($toEmail);
+ // toEmail
+ $toRss = $tp->toRss($text);
+ echo "User-input ≫ toRss(\$text)
";
+ print_a($toRss);
echo "";
diff --git a/e107_plugins/news/e_rss.php b/e107_plugins/news/e_rss.php
index a99415318..f637ea8a8 100644
--- a/e107_plugins/news/e_rss.php
+++ b/e107_plugins/news/e_rss.php
@@ -100,7 +100,7 @@ class news_rss // plugin-folder + '_rss'
$rss[$i]['author_email'] = $value['user_email'];
$rss[$i]['category_name'] = $tp->toHTML($value['category_name'],TRUE,'defs');
$rss[$i]['category_link'] = SITEURL."news.php?cat.".$value['news_category']; //TODO SEFURL.
- $rss[$i]['pubdate'] = $value['news_datestamp'];
+ $rss[$i]['datestamp'] = $value['news_datestamp'];
$rss[$i]['description'] = $this->getDescription($value);
if($value['news_allow_comments'] && $pref['comments_disabled'] != 1)
diff --git a/e107_plugins/rss_menu/rss.php b/e107_plugins/rss_menu/rss.php
index b6495632d..53ac1c417 100644
--- a/e107_plugins/rss_menu/rss.php
+++ b/e107_plugins/rss_menu/rss.php
@@ -324,6 +324,7 @@ class rssCreate
$this -> rssItems[$k]['author'] = $row['author'];
$this -> rssItems[$k]['author_email'] = $row['author_email'];
$this -> rssItems[$k]['title'] = $row['title'];
+
if($row['link'])
{
if(stripos($row['link'], 'http') !== FALSE)
@@ -366,10 +367,14 @@ class rssCreate
$this -> rssItems[$k]['category_link'] = SITEURLBASE.e_PLUGIN_ABS.$row['category_link'];
}
}
- if($row['datestamp'])
+ if(!empty($row['datestamp']))
{
$this -> rssItems[$k]['pubdate'] = $row['datestamp'];
}
+ else
+ {
+ $this -> rssItems[$k]['pubdate'] = time();
+ }
if($row['custom'])
{
@@ -472,8 +477,10 @@ class rssCreate
e107 (http://e107.org)
hourly
1
- 60
- $this->contentType, 'id'=>$this->topicid),'full')."\" rel=\"self\" type=\"application/rss+xml\" />\n";
+ 60";
+
+ echo "
+ toRss(e107::url('rss_menu','atom', array('rss_url'=>$this->contentType, 'rss_topicid'=>$this->topicid),'full'))."\" rel=\"self\" type=\"application/rss+xml\" />\n";
if (trim(SITEBUTTON))
{
@@ -654,7 +661,7 @@ class rssCreate
echo "
http://e107.org/\n
\n
- $this->contentType, 'id'=>$this->topicid),'full')."' />\n";
+ $this->contentType, 'rss_topicid'=>$this->topicid),'full'))."' />\n";
// Optional
include(e_ADMIN."ver.php");
@@ -694,7 +701,7 @@ class rssCreate
//complete story here\n
echo "
\n
- ".$tp->toRss($value['description']). "\n";
+ ".$tp->toRss($tp->toText($value['description'])). "\n";
// Optional
if(!empty($value['category_name']))