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

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Apr 30 16:50:09 UTC 2008


User:      docelic
Date:      2008-04-30 16:50:09 GMT
Modified:  code/Filter html2text.filter
Log:
* Make the existing simple html2text filter to also strip
  italic, bold and underline from input

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


rev 1.8, prev_rev 1.7
Index: html2text.filter
===================================================================
RCS file: /var/cvs/interchange/code/Filter/html2text.filter,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- html2text.filter	30 Mar 2007 23:40:44 -0000	1.7
+++ html2text.filter	30 Apr 2008 16:50:09 -0000	1.8
@@ -6,7 +6,7 @@
 # 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.7 2007-03-30 23:40:44 pajamian Exp $
+# $Id: html2text.filter,v 1.8 2008-04-30 16:50:09 docelic Exp $
 
 CodeDef html2text Filter
 CodeDef html2text Description Simple html2text
@@ -14,6 +14,7 @@
 sub {
 	my $val = shift;
 
+	$val =~ s%</?(b|i|u)>%%gi;
 	$val =~ s%\s*<(?:br\s*/?|/?p)>\s*%\n%gi;
 	return $val;
 }







More information about the interchange-cvs mailing list