17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1219 Views |
-
remove HTML tags from RSS

3 September 2008 at 12:43pm
Hi,
I am using the blog module with TinyMCE rich text editor. Is there any way to remove the HTML tags that I use in blog posts from the RSS output? I use embedded video in some blog posts but both the embed and object tag are no valid elements for RSS. I have problems to load the feed into another page.
I tried strip_tags() in various places - even in the sapphire RSSFeed class - but nothing seems to work. Ideally I would not like to touch sapphire for this.
This is a sample of my modified RSS generating code in BlogHolder.php:
function rss() {
global $project;
$rss = new RSSFeed($this->LatestEntries(), $this->Link(), "MyDomain - 10 most recent blog entries", "Show the 10 most recent blog entries.", "Title", "Content");
$rss->outputToBrowser();
}
function LatestEntries() {
// return the latest 10 blog articles
return DataObject::get("BlogEntry", "", "`SiteTree_Live`.ID DESC", "", 10);
}Any help or suggestion is appreciated.
Cheers!
Anatol
| 1219 Views | ||
|
Page:
1
|
Go to Top |
