[Erp5-report] r19462 - /erp5/trunk/products/ERP5Type/patches/transforms/html_to_text.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 21 20:23:31 CET 2008
Author: jerome
Date: Thu Feb 21 20:23:31 2008
New Revision: 19462
URL: http://svn.erp5.org?rev=19462&view=rev
Log:
patch to convert <br/> in newlines
Modified:
erp5/trunk/products/ERP5Type/patches/transforms/html_to_text.py
Modified: erp5/trunk/products/ERP5Type/patches/transforms/html_to_text.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/transforms/html_to_text.py?rev=19462&r1=19461&r2=19462&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/transforms/html_to_text.py (original)
+++ erp5/trunk/products/ERP5Type/patches/transforms/html_to_text.py Thu Feb 21 20:23:31 2008
@@ -44,6 +44,10 @@
('<script [^>]>.*</script>(?im)', ''),
('<style [^>]>.*</style>(?im)', ''),
('<head [^>]>.*</head>(?im)', ''),
+
+ # added for ERP5, we want to transform <br/> in newlines
+ ('<br[\s\/]*>', '\n'),
+
('(?im)<(h[1-6r]|address|p|ul|ol|dl|pre|div|center|blockquote|form|isindex|table)(?=\W)[^>]*>', ' '),
('<[^>]*>(?i)(?m)', ''),
)
More information about the Erp5-report
mailing list