Changeset 11545


Ignore:
Timestamp:
04/25/11 05:18:56 (13 months ago)
Author:
SvenDowideit
Message:

Item10679: html2tml goes into an infinte loop with un-terminated img tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML.pm

    r11467 r11545  
    5353    my ($class) = @_; 
    5454 
     55#use handler method names to allow of subclassing of HTML2TML 
    5556    my $this = new HTML::Parser( 
    56         start_h          => [ \&_openTag,  'self,tagname,attr' ], 
    57         end_h            => [ \&_closeTag, 'self,tagname' ], 
    58         text_h           => [ \&_text,     'self,text' ], 
    59         comment_h        => [ \&_comment,  'self,text' ], 
    60         declaration_h    => [ \&_ignore,   'self' ], 
    61         start_document_h => [ \&_ignore,   'self' ], 
    62         end_document_h   => [ \&_ignore,   'self' ], 
    63         default_h        => [ \&_default,  'self,event,text' ] 
     57        start_h          => [ '_openTag',  'self,tagname,attr' ], 
     58        end_h            => [ '_closeTag', 'self,tagname' ], 
     59        text_h           => [ '_text',     'self,text' ], 
     60        comment_h        => [ '_comment',  'self,text' ], 
     61        declaration_h    => [ '_ignore',   'self' ], 
     62        start_document_h => [ '_ignore',   'self' ], 
     63        end_document_h   => [ '_ignore',   'self' ], 
     64        default_h        => [ '_default',  'self,event,text' ], 
     65        comment_h         => [ '_ignore',   'self' ] 
    6466    ); 
    6567 
     
    202204# Autoclose tags without waiting for a /tag 
    203205my %autoClose = map { $_ => 1 } 
    204   qw( area base basefont br col embed frame hr input link meta param ); 
     206  qw( area base basefont br col embed frame hr input link meta param img ); 
    205207 
    206208# Support auto-close of the tags that are most typically incorrectly 
Note: See TracChangeset for help on using the changeset viewer.