Welcome to Geeklog, Anonymous Wednesday, April 24 2024 @ 02:39 am EDT

Geeklog Forums

RSS+html+syndicated


Status: offline

nightshadow

Forum User
Newbie
Registered: 12/19/04
Posts: 8
Location:Brisbane, AU
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
 Quote

Status: offline

THEMike

Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
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:

Text Formatted Code

    /**
    * 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);
    }

 
 Quote

All times are EDT. The time is now 02:39 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content