[interchange-cvs] interchange - jon modified code/Filter/html2text.filter

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Mon Jun 30 23:53:44 UTC 2008


User:      jon
Date:      2008-06-30 23:53:44 GMT
Modified:  code/Filter html2text.filter
Log:
Allow paragraph attributes such as <p align="center">.

This brings back behavior that broke in revision 1.6.

Revision  Changes    Path
1.9                  interchange/code/Filter/html2text.filter


rev 1.9, prev_rev 1.8
Index: html2text.filter
===================================================================
RCS file: /var/cvs/interchange/code/Filter/html2text.filter,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -u -r1.8 -r1.9
--- html2text.filter	30 Apr 2008 16:50:09 -0000	1.8
+++ html2text.filter	30 Jun 2008 23:53:44 -0000	1.9
@@ -1,4 +1,4 @@
-# Copyright 2002-2007 Interchange Development Group and others
+# Copyright 2002-2008 Interchange Development Group and others
 # Copyright 1996-2002 Red Hat, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
@@ -6,16 +6,15 @@
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.  See the LICENSE file for details.
 # 
-# $Id: html2text.filter,v 1.8 2008-04-30 16:50:09 docelic Exp $
+# $Id: html2text.filter,v 1.9 2008-06-30 23:53:44 jon Exp $
 
 CodeDef html2text Filter
 CodeDef html2text Description Simple html2text
 CodeDef html2text Routine <<EOR
 sub {
 	my $val = shift;
-
 	$val =~ s%</?(b|i|u)>%%gi;
-	$val =~ s%\s*<(?:br\s*/?|/?p)>\s*%\n%gi;
+	$val =~ s%\s*<(?:br\s*/?|/?p[^>]*)>\s*%\n%gi;
 	return $val;
 }
 EOR







More information about the interchange-cvs mailing list