Preparing a html string for rss

Preparing a html string for rss

am 02.12.2007 14:43:36 von cronoklee

Anyone have/know of a function that will clean a html string of all
tags and invalid characters, ready for an RSS feed in iso-8859-1
encoding?

I'm using strip_tags at present but it's not catching things like euro
signs which is stopping my feed from validating.

Thanks,
Ciar=E1n

Re: Preparing a html string for rss

am 02.12.2007 22:27:15 von mw

Ciaran wrote:
> Anyone have/know of a function that will clean a html string of all
> tags and invalid characters, ready for an RSS feed in iso-8859-1
> encoding?
>
> I'm using strip_tags at present but it's not catching things like euro
> signs which is stopping my feed from validating.
>
> Thanks,
> Ciarán

Try mb_convert_encode to convert to US-ASCII
http://us2.php.net/manual/en/function.mb-convert-encoding.ph p