mhonarc-commits
[Top] [All Lists]

CVS: mhonarc/MHonArc/lib mhtxtplain.pl,2.23,2.24

2002-10-10 15:27:24
Update of /cvsroot/mhonarc/mhonarc/MHonArc/lib
In directory subversions:/tmp/cvs-serv17767

Modified Files:
	mhtxtplain.pl 
Log Message:
* Fixed calling sematics of HTML filter if htmlcheck is specified.
* Removed presetting us-ascii and iso-8859-1 in %asis hash.
* Changed calling code of charset converters to use new
  MAILload_charset_converter().
* Fixed <x-flow> removal regex.


Index: mhtxtplain.pl
===================================================================
RCS file: /cvsroot/mhonarc/mhonarc/MHonArc/lib/mhtxtplain.pl,v
retrieving revision 2.23
retrieving revision 2.24
diff -C2 -r2.23 -r2.24
*** mhtxtplain.pl	25 Sep 2002 03:56:50 -0000	2.23
--- mhtxtplain.pl	10 Oct 2002 22:27:19 -0000	2.24
***************
*** 208,215 ****
  	my $html_filter = readmail::load_filter('text/html');
  	if (defined($html_filter) && defined(&$html_filter)) {
! 	    return (&$html_filter($fields, $data, $isdecode, $args));
  	} else {
  	    require 'mhtxthtml.pl';
! 	    return (m2h_text_html::filter($fields, $data, $isdecode, $args));
  	}
      }
--- 208,219 ----
  	my $html_filter = readmail::load_filter('text/html');
  	if (defined($html_filter) && defined(&$html_filter)) {
! 	    return (&$html_filter($fields, $data, $isdecode,
! 		      readmail::get_filter_args(
! 			'text/html', 'text/*', $html_filter)));
  	} else {
  	    require 'mhtxthtml.pl';
! 	    return (m2h_text_html::filter($fields, $data, $isdecode,
! 		      readmail::get_filter_args(
! 			'text/html', 'text/*', 'm2h_text_html::filter')));
  	}
      }
***************
*** 217,224 ****
      my($charset, $nourl, $doquote, $igncharset, $nonfixed, $textformat,
         $keepspace, $maxwidth, $target, $defset, $xhtml);
!     my(%asis) = (
! 	'us-ascii'   => 1,
! 	'iso-8859-1' => 1,
!     );
  
      $nourl	= ($mhonarc::NOURL || ($args =~ /\bnourl\b/i));
--- 221,225 ----
      my($charset, $nourl, $doquote, $igncharset, $nonfixed, $textformat,
         $keepspace, $maxwidth, $target, $defset, $xhtml);
!     my(%asis) = ( );
  
      $nourl	= ($mhonarc::NOURL || ($args =~ /\bnourl\b/i));
***************
*** 263,270 ****
  
      ## Check MIMECharSetConverters if charset should be left alone
!     my $charcnv = &readmail::load_charset($charset);
!     if (!defined($charcnv)) {
!       $charcnv = &readmail::load_charset('default');
!     }
      if (defined($charcnv) && $charcnv eq '-decode-') {
  	$asis{$charset} = 1;
--- 264,269 ----
  
      ## Check MIMECharSetConverters if charset should be left alone
!     my($charcnv, $real_charset_name) =
! 	    readmail::MAILload_charset_converter($charset);
      if (defined($charcnv) && $charcnv eq '-decode-') {
  	$asis{$charset} = 1;
***************
*** 280,284 ****
  	# Registered in CHARSETCONVERTERS
  	if (defined($charcnv) && defined(&$charcnv)) {
! 	    $$data = &$charcnv($$data, $charset);
  
  	# Other
--- 279,283 ----
  	# Registered in CHARSETCONVERTERS
  	if (defined($charcnv) && defined(&$charcnv)) {
! 	    $$data = &$charcnv($$data, $real_charset_name);
  
  	# Other
***************
*** 301,305 ****
  	my $currdepth = 0;
  	my $ret='';
! 	s!^</?x-flowed>\r?\n>!!mg; # we don't know why Eudora puts these in
  	while (length($$data)) {
  	    $$data =~ /^((?:&gt;)*)/;
--- 300,304 ----
  	my $currdepth = 0;
  	my $ret='';
! 	$$data =~ s!^</?x-flowed>\r?\n>!!mg;
  	while (length($$data)) {
  	    $$data =~ /^((?:&gt;)*)/;

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV