Ignore:
Timestamp:
09/15/09 21:30:53 (3 years ago)
Author:
MichaelTempest
Message:

Item1980: Fix the sticky-inside-verbatim case by noting that there is no need to encode the characters for $TT0, $TT1 and TT2 - they should all be removed by the end of the conversion.

Added an explicit check to ensure that there are no more of $TT0, $TT1 and $TT2 after conversion to HTML completes, and throw an exception if it there is. That gives users a chance to save their work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x00/WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm

    r4931 r4940  
    16521652    }, 
    16531653    { 
    1654         exec => $ROUNDTRIP | $CANNOTWYSIWYG, # SMELL: Fix this case 
     1654        exec => $HTML2TML | $ROUNDTRIP, 
    16551655        name => 'stickyInsideVerbatimItem1980', 
    16561656        tml  => <<'GLUED', 
     
    21582158 
    21592159    my $txer = new Foswiki::Plugins::WysiwygPlugin::TML2HTML(); 
    2160     my $html = $txer->convert( 
    2161         $tml, 
    2162         $this->TML_HTMLconverterOptions() 
    2163     ); 
     2160    # This conversion can throw an exception.  
     2161    # This might be expected if $args->{exec} also has $CANNOTWYSIWYG set 
     2162    my $html = eval { 
     2163        $txer->convert( 
     2164            $tml, 
     2165            $this->TML_HTMLconverterOptions() 
     2166        ); 
     2167    }; 
     2168    $html = $@ if $@; 
    21642169 
    21652170    $txer = new Foswiki::Plugins::WysiwygPlugin::HTML2TML(); 
Note: See TracChangeset for help on using the changeset viewer.