Funny solution, wouldn't have tought about it. Bravo !
My extension let you keep some tags (eg, a b i) and truncate it.
Moreover, it secures ez publish, by cleaning properly all the XSS that you might got in if you have literal class=html activated (in my case, mandatory if I want to be able to have a ok looking RSS import).
merci pour tes compliments qui me touchent beaucoup. cela fait 4 mois que j'ai découvert eZPublish et PHP... Tu veux dire que ma solution est plus crédible que la tienne...?! ou c'est le contraire ? Je n'ai pas tout pigé...
My solution is an extension that contains php code that does the work. It's more advanced than your solution (and likely to be faster too). I provides the ability to keep some tags (eg keep the bold and italic and links) and get rid of the others.
It also allows to protect your site against attack if you let your users to publish html code in your content (ie if you have the literal tag with "html" class).