Re: Use lxml.html.clean.Cleaner for safe HTML transforms?

Christian Ledermann <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <CABCjzWpSQJW_rpgsKTuJMgUP2kBCG0TZKBp5DhxYV51iGjqKNg@mail.gmail.com>
I used HTML Laundry in the past and was very content with it.

I threw some pretty nasty html at it , parts copied from ms word
some invalid and iirc some not even well formed.

it worked as advertised

On Thu, Aug 7, 2014 at 9:27 AM, Tom Gross <[email protected]> wrote:
> Started one:
> https://dev.plone.org/ticket/14929
>
> Tom
>
> Am 06.08.2014 19:42, schrieb Wichert Akkerman:
>>
>>> On 06 Aug 2014, at 15:43, Tom Gross <[email protected]> wrote:
>>>
>>> Hi Plone developers
>>>
>>> I did a little experiment using lxml cleaner for safe HTML
>>> transformation in PortalTransforms [1]. It looks very promising (fast
>>> and clean!) so far but some tests are failing [2].
>>
>> You may also want to look at htmllaundry (see http://pypi.python.org/pypi/htmllaundry <http://pypi.python.org/pypi/htmllaundry> ). That has various routines to sanitize and clean html, using lxml under the hood. NuPlone[r] (https://pypi.python.org/pypi/NuPlone <https://pypi.python.org/pypi/NuPlone> ) has already been using this for a number of years.
>>
>> Wichert.
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Infragistics Professional
>> Build stunning WinForms apps today!
>> Reboot your WinForms applications with our WinForms controls.
>> Build a bridge from your legacy apps to the future.
>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>>
>>
>>
>> _______________________________________________
>> Plone-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/plone-developers
>>
>
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Plone-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/plone-developers



-- 
Best Regards,

Christian Ledermann

London - UK
Mobile : +44 7474997517

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Plone-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.