Back to index

plone3  3.1.7
Classes | Functions
PortalTransforms.transforms.html_to_text Namespace Reference

Classes

class  html_to_text

Functions

def register

Function Documentation

Definition at line 7 of file html_to_text.py.

00007 
00008 def register():
00009     # XXX convert entites with htmlentitydefs.name2codepoint ?
00010     return html_to_text("html_to_text",
00011                        ('<script [^>]>.*</script>(?im)', ' '),
00012                        ('<style [^>]>.*</style>(?im)', ' '),
00013                        ('<head [^>]>.*</head>(?im)', ' '),
00014                        ('(?im)</?(font|em|i|strong|b)(?=\W)[^>]*>', ''),
00015                        ('<[^>]*>(?i)(?m)', ' '),
00016                        )