On Apr 12, 2009, at 1:20 PM, Lee.M wrote:
> On Apr 12, 2009, at 2:12 PM, Lee.M wrote:
>
>>> If HTML::Obliterate were to handle all these corner cases using
>>> regexp's, then HTML::Strip's claims may actually be correct.
>>
>> Perhaps, I think the goals are slightly different though so you'd
>> never need that much in the way of regexes,
>
> So it requires much more logic and resources, which is fine, it is
> what it is.
>
> HTML::Obliterate strips HTML w/ no attempt to try an understand what
> you mean by it. So it requires much less logic and resources, which is
> also fine, it is what it is.


It is for all source appearances something that was meant to go in the
Acme namespace and its regexes are really quite bad. I would not
recommend using or even trying to patch this thing. It's fairly
trivial to strip HTML with something like HTML::TokeParser or
XML::LibXML and it is going to work right.

In general, never use a regex where a parser exists. It's false
economy and much harder to get right than spending an hour or two
learning the interface for a good parser.

There is a TT2 filter recipe in HTML::Truncate's Pod too. :)

-Ashley
-- 



_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to