PDA

View Full Version : Filtering HTML from some RSS feeds


TheMusicMan
12-29-2005, 10:16 PM
Some RSS feeds I notice include html tags within the post information such as <p>, <img> and <a href> etc. Now, if as is the case on nearly every vB forum I frequent, html in posts is not permitted, is there any way I can filter out these tags from the RSS feed so as I can still post them?

When they are posted now they look awful due to the page not allowing the html to be rendered (correctly so), but it would be good if I could still use these feeds as the information within them is extremely relevant for my forums.

Thanks

Marco van Herwaarden
12-30-2005, 04:35 AM
$nohtml = strip_tags($htmlstring);

TheMusicMan
12-30-2005, 09:27 PM
Thanks Marco... but where should I include that php code?

Marco van Herwaarden
12-31-2005, 05:31 AM
Wherever in your script you are handling reading the RSS and inserting it into a post.

TheMusicMan
01-01-2006, 10:26 AM
Wherever in your script you are handling reading the RSS and inserting it into a post.

I'll have a look and try to figure it out... I am using the RSS feeds plug in from here.