[Zope] Strip all HTML

Paul Winkler pw_lists@slinkp.com
Tue Aug 5 16:09:17 EDT 2003


On Tue, Aug 05, 2003 at 08:02:28AM -0700, Dylan Reinhardt wrote:
> On Tue, 2003-08-05 at 07:49, Paul Winkler wrote:
> > hmm... doesn't the tags pattern make the other two redundant?
>
> Not that I can see.  You may be reading the last expression
> left-to-right, but it's *evaluated* inside (right) to outside (left).

no, i was just not really paying attention to what the different
expressions would match. sorry!

> In some cases (<B>, for example) you want to remove only the tags.  In
> other cases (<script>, <style>) you want to remove the enclosed contents
> too.

right, i don't know how this simple fact escaped me.

> I'm sure it's possible to come up with a single, highly-clever
> regex that does it all, 

god, I hope not :-\

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's BLITHE SHOOPSTERSTOOPER ESTATE!
(random hero from isometric.spaceninja.com)




More information about the Zope mailing list