Posted on: 12/19/04 11:59pm
By: nightshadow
ok, firstly i am running 1.3.9.sr2 (i think) and i have already patched the timezone and upgraded the rss feeds to rss 2.0.
Now when i post a feed as plain text it comes through fine to rss (and urls are converted to links) but plain text on my site.
When i post in html format the Html formatting comes through fine on my site but as plain text (no breaks, no links, no extra spaces etc) on my rss feed.
I know i have the settings fine for allowed html tags etc but i am guessing the HTML is being stripped before saving, then syndicated, then added back for displaying on the site.
How/what do i modify to allow HTML to come through on my rss feeds? can anyone point me in the right direction.
http://nightshadow.co.uk
RSS+html+syndicated
Posted on: 12/20/04 02:53am
By: THEMike
The current content syndication engine strips all HTML formatting from articles in order to make the content valid XML. When I created the RSS2, Atom and RDF writers I just used the same strip routine to make it consistent.
You could try editing this function to make your XML valid, but contain HTML markup:
/**
* Format the content of an item
*
* @author Dirk Haun <dirk AT haun-online DOT de>
* @access private
*
*/
function _formatContent ($text)
{
$storytext = trim (strip_tags ($text));
$storytext = preg_replace ("/(\015)/", "", $storytext);
if ($this->_feedcontentlen > 1) {
if (strlen ($storytext) > $this->_feedcontentlen) {
$storytext = substr ($storytext, 0, $this->_feedcontentlen - 3)
. '...';
}
}
return htmlspecialchars ($storytext);
}