The kill_tags attribute of html.Cleaner could be settable in the constructor

Bug #847635 reported by Wojtek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Low
Unassigned

Bug Description

Right now it's set internally - I would like to clean up <style> tags but NOT clean up inline styles - this is for sanitizing email on a website. I can also see other uses for it - it would be really simple to make it settable..

Thank you.

Revision history for this message
scoder (scoder) wrote : Re: [Bug 847635] [NEW] The kill_tags attribute of html.Cleaner could be settable in the constructor

Wojtek, 12.09.2011 10:11:
> Right now it's set internally - I would like to clean up<style> tags
> but NOT clean up inline styles - this is for sanitizing email on a
> website. I can also see other uses for it - it would be really simple
> to make it settable..

You are free to provide a pull request on github with the proposed changes.

Stefan

Revision history for this message
Wojtek (wsocki) wrote :

Hey,

https://github.com/lxml/lxml/pull/13

Regards,

On Sep 12, 2011, at 10:46 , Stefan Behnel wrote:

> Wojtek, 12.09.2011 10:11:
>> Right now it's set internally - I would like to clean up<style> tags
>> but NOT clean up inline styles - this is for sanitizing email on a
>> website. I can also see other uses for it - it would be really simple
>> to make it settable..
>
> You are free to provide a pull request on github with the proposed
> changes.
>
> Stefan
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/847635
>
> Title:
> The kill_tags attribute of html.Cleaner could be settable in the
> constructor
>
> Status in lxml - the Python XML toolkit:
> New
>
> Bug description:
> Right now it's set internally - I would like to clean up <style> tags
> but NOT clean up inline styles - this is for sanitizing email on a
> website. I can also see other uses for it - it would be really simple
> to make it settable..
>
> Thank you.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/lxml/+bug/847635/+subscriptions

Revision history for this message
Wojtek (wsocki) wrote :

I added the docs a couple days ago.

On Sep 12, 2011, at 10:46 , Stefan Behnel wrote:

> Wojtek, 12.09.2011 10:11:
>> Right now it's set internally - I would like to clean up<style> tags
>> but NOT clean up inline styles - this is for sanitizing email on a
>> website. I can also see other uses for it - it would be really simple
>> to make it settable..
>
> You are free to provide a pull request on github with the proposed
> changes.
>
> Stefan
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/847635
>
> Title:
> The kill_tags attribute of html.Cleaner could be settable in the
> constructor
>
> Status in lxml - the Python XML toolkit:
> New
>
> Bug description:
> Right now it's set internally - I would like to clean up <style> tags
> but NOT clean up inline styles - this is for sanitizing email on a
> website. I can also see other uses for it - it would be really simple
> to make it settable..
>
> Thank you.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/lxml/+bug/847635/+subscriptions

Revision history for this message
scoder (scoder) wrote :

Included in lxml 2.3.1.

Changed in lxml:
milestone: none → 2.3.1
importance: Undecided → Low
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.