Changeset 10487


Ignore:
Timestamp:
01/06/11 12:46:15 (17 months ago)
Author:
PaulHarvey
Message:

Item2174: Revert Foswikirev:10484 on Release01x01

Oops, Michael says this wasn't ready yet.

Revert "Item2174: Encode TML newlines and sequences of spaces when converting to HTML, and encode the number of dashes in the TML for a horizontal rule."

This reverts commit d367122b4f6f9d7a709b3a95398966c210c0be8d.

Conflicts:

data/System/WysiwygPlugin.txt
lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm
lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm
test/unit/WysiwygPlugin/TranslatorTests.pm

Location:
branches/Release01x01/WysiwygPlugin
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x01/WysiwygPlugin/data/System/WysiwygPlugin.txt

    r10486 r10487  
    163163---+++ TinyMCEPlugin integration 
    164164%STARTSECTION{"tinymceintegration"}% 
     165   * Foswikitask:Item2174 - WysiwygPlugin removes line breaks 
     166      * Work-around: Use the =* Set NOWYSIWYG = 1= setting to disable WYSIWYG on line-sensitive topics 
    165167   * Foswikitask:Item1396 - Anchors are not handled by WysiwygPlugin 
    166168   * Foswikitask:Item5955 - WysiwygPlugin fails to roundtrip tables with align="center", border attributes, etc. 
     
    188190|  Release: | %$RELEASE% | 
    189191|  Change History: | | 
    190 |  26 Nov 2010 | Foswikitask:Item2174: Protect line breaks within paragraphs in TML <br/> \ 
    191                  Foswikitask:Item10048: Try to use Macros in the src URLs of images with titles <br/> \ 
     192|  26 Nov 2010 | Foswikitask:Item10048: Try to use Macros in the src URLs of images with titles <br/> \ 
    192193                 Foswikitask:Item9973: Fix attachments REST handler to deal with topics named with international characters | 
    193194|  04 Oct 2010 | Foswikitask:Item1391: Protect div and span tags with =style= attributes | 
  • branches/Release01x01/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm

    r10485 r10487  
    1616our $ALWAYS_BLOCK_S = join( '|', keys %ALWAYS_BLOCK ); 
    1717 
    18 our $STARTWW  = qr/^|(?<=[ \t\n\(\!])|(?<=<p>)|(?<= <\/span>)/om; 
    19 our $ENDWW    = qr/$|(?=[ \t\n\,\.\;\:\!\?\)])|(?=<\/p>)|(?=<span\b[^>]*> )/om; 
     18our $STARTWW  = qr/^|(?<=[ \t\n\(\!])/om; 
     19our $ENDWW    = qr/$|(?=[ \t\n\,\.\;\:\!\?\)])/om; 
    2020our $PROTOCOL = qr/^(file|ftp|gopher|https?|irc|news|nntp|telnet|mailto):/; 
    2121 
  • branches/Release01x01/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm

    r10486 r10487  
    3838 
    3939my %tml2htmlClass = map { $_ => 1 } 
    40   qw( WYSIWYG_PROTECTED WYSIWYG_STICKY TMLverbatim WYSIWYG_LINK 
    41   TMLhtml WYSIWYG_HIDDENWHITESPACE ); 
     40    qw( WYSIWYG_PROTECTED WYSIWYG_STICKY TMLverbatim WYSIWYG_LINK 
     41        TMLhtml ); 
    4242 
    4343=pod 
     
    15181518    my ( $f, $kids ) = $this->_flatten($options); 
    15191519    return ( $f, '<hr />' . $kids ) if ( $options & $WC::NO_BLOCK_TML ); 
    1520  
    1521     my $dashes = 3; 
    1522     if (    $this->{attrs}->{style} 
    1523         and $this->{attrs}->{style} =~ s/\bnumdashes\s*:\s*(\d+)\b// ) 
    1524     { 
    1525         $dashes = $1; 
    1526         $dashes = 3 if $dashes < 3; 
    1527         $dashes = 160 if $dashes > 160;    # Filter out probably-bad data 
    1528     } 
    1529     return ( $f | $WC::BLOCK_TML, 
    1530         $WC::CHECKn . ( '-' x $dashes ) . $WC::CHECKn . $kids ); 
     1520    return ( $f | $WC::BLOCK_TML, $WC::CHECKn . '---' . $WC::CHECKn . $kids ); 
    15311521} 
    15321522 
     
    16931683    } 
    16941684 
    1695     if ( _removeClass( \%atts, 'WYSIWYG_HIDDENWHITESPACE' ) ) { 
    1696  
    1697 # This regular expression ensures the encoded whitespace is valid. 
    1698 # The limit on the number of digits will ensure that the numbers are reasonable. 
    1699         if (    $atts{style} 
    1700             and $atts{style} =~ 
    1701             s/\bencoded\s*:\s*(['"])((?:b|n|t\d{1,2}|s\d{1,3})+)\1;?// ) 
    1702         { 
    1703             my $whitespace = $2; 
    1704  
    1705             #print STDERR "'$whitespace' -> "; 
    1706             $whitespace =~ s/b/\\/g; 
    1707             $whitespace =~ s/n/$WC::NBBR/g; 
    1708             $whitespace =~ s/t(\d+)/'\t' x $1/ge; 
    1709             $whitespace =~ s/s(\d+)/$WC::NBSP x $1/ge; 
    1710  
    1711             #print STDERR "'$whitespace'\n"; 
    1712             #require Data::Dumper; 
    1713             my ( $f, $kids ) = 
    1714               $this->_flatten( $options | $WC::KEEP_WS | $WC::KEEP_ENTITIES ); 
    1715  
    1716             #die Data::Dumper::Dumper($kids); 
    1717             if ( $kids eq ' ' ) { 
    1718  
    1719                 # The space was not changed 
    1720                 # So restore the encoded whitespace 
    1721                 return ( $f, $whitespace ); 
    1722             } 
    1723             elsif ( length($kids) == 0 ) { 
    1724  
    1725                 # The user deleted the space 
    1726                 # So return blank 
    1727                 return ( 0, '' ); 
    1728             } 
    1729  
    1730             #else {die "'".ord($kids)."'";}if(1){} 
    1731             elsif ( 0 
    1732                 and 
    1733                 ( $kids eq '&nbsp;' or $kids eq '&#160;' or $kids eq chr(160) ) 
    1734               ) 
    1735             {    # SMELL: Firefox-specific 
    1736                  # This was probably inserted by Firefox after the user deleted the space. 
    1737                  # So return blank 
    1738                 return ( 0, '' ); 
    1739             } 
    1740             else { 
    1741  
    1742              # The user entered some new text 
    1743              # Return the combination. 
    1744              # Assume that a leading space corresponds to the encoded whitespace 
    1745                 $kids =~ s/^ //; 
    1746                 return ( $f, $whitespace . $kids ); 
    1747             } 
    1748         } 
    1749     } 
    1750  
    17511685    # Remove all other (non foswiki) classes 
    17521686    if ( defined $atts{class} && $atts{class} !~ /foswiki/ ) { 
  • branches/Release01x01/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm

    r10486 r10487  
    381381    $text = $this->_takeOutCustomTags($text); 
    382382 
     383    $text =~ s/\\\n/ /g; 
    383384    $text =~ s/\t/   /g; 
    384     $text =~ s/( +\\\n)/$this->_hideWhitespace($1)/ge; 
    385385 
    386386    # Remove PRE to prevent TML interpretation of text inside it 
     
    450450 
    451451    # Horizontal rule 
    452     $text =~ s/^(---+)$/_encodeHr($1)/gme; 
     452    my $hr = CGI::hr( { class => 'TMLhr' } ); 
     453    $text =~ s/^---+$/$hr/gm; 
    453454 
    454455    # Wrap tables with macros before or after them in a <div>, 
     
    627628 
    628629        } 
    629         elsif ($inList 
    630             && $line =~ s/^([ \t]+)/$this->_hideWhitespace("\n$1")/e ) 
    631         { 
     630        elsif ( $inList && $line =~ /^[ \t]/ ) { 
    632631 
    633632            # Extend text of previous list item by dropping through 
    634             $result[-1] .= $line; 
    635             $line = ''; 
    636  
    637         } 
    638         elsif ( $line =~ /^<hr class="TMLhr"/ ) { 
     633 
     634        } 
     635        elsif ( $line eq $hr ) { 
    639636            push( @result, '</p>' ) if $inParagraph; 
    640637            $inParagraph = 0; 
     
    661658            $this->_addListItem( \@result, '', '', '' ) if $inList; 
    662659            $inList = 0; 
    663             if ( $inParagraph and @result and $result[-1] !~ /<p>$/ ) { 
    664  
    665                 # This is the second (or later) line of a paragraph 
    666  
    667                 my $whitespace = "\n"; 
    668                 if ( $line =~ s/^(\s+)// ) { 
    669                     $whitespace .= $1; 
    670                 } 
    671                 $line = $this->_hideWhitespace($whitespace) . $line; 
    672             } 
    673660            unless ( $inParagraph or $inDiv ) { 
    674661                push( @result, '<p>' ); 
    675662                $inParagraph = 1; 
    676663            } 
    677             $line =~ s/(\s\s+)/$this->_hideWhitespace($1)/ge; 
    678             $result[-1] .= $line; 
    679             $line = ''; 
    680         } 
    681  
    682         push( @result, $line ) if length($line) > 0; 
     664        } 
     665 
     666        push( @result, $line ); 
    683667    } 
    684668 
     
    739723 
    740724    return $text; 
    741 } 
    742  
    743 sub _encodeHr { 
    744     my $dashes = shift; 
    745     my $style  = ''; 
    746     if ( length($dashes) > 3 ) { 
    747         $style = ' style="{numdashes:' . length($dashes) . '}"'; 
    748     } 
    749     return '<hr class="TMLhr"' . $style . ' />'; 
    750 } 
    751  
    752 sub _hideWhitespace { 
    753     my $this       = shift; 
    754     my $whitespace = shift; 
    755  
    756     $whitespace =~ s/\\/b/g; 
    757     $whitespace =~ s/\n/n/g; 
    758     $whitespace =~ s/(\t+)/'t' . length($1)/ge; 
    759     $whitespace =~ s/( +)/'s' . length($1)/ge; 
    760  
    761     return $this->_liftOutGeneral( 
    762         " ", 
    763         { 
    764             tag    => 'span', 
    765             class  => "WYSIWYG_HIDDENWHITESPACE", 
    766             params => "style=\"{encoded:'$whitespace'}\"", 
    767         } 
    768     ); 
    769725} 
    770726 
  • branches/Release01x01/WysiwygPlugin/test/unit/WysiwygPlugin/BrowserEditorInterface.pm

    r10485 r10487  
    1111sub _DEBUG {0}; 
    1212 
    13 my $editFrameLocator                = "css=iframe#topic_ifr"; 
    14 my $wikitextLocator                 = "css=a#topic_hide"; 
    15 my $wysiwygLocator                  = "css=input#topic_2WYSIWYG"; 
    16 my $editTextareaLocator             = "css=textarea#topic"; 
    17 my $editCancelButtonLocator         = "css=input#cancel"; 
    18 my $editSaveButtonLocator           = "css=input#save"; 
    19 my $editSaveContinueButtonLocator   = "css=input#checkpoint"; 
     13my $editFrameLocator        = "css=iframe#topic_ifr"; 
     14my $wikitextLocator         = "css=a#topic_hide"; 
     15my $wysiwygLocator          = "css=input#topic_2WYSIWYG"; 
     16my $editTextareaLocator     = "css=textarea#topic"; 
     17my $editCancelButtonLocator = "css=input#cancel"; 
     18my $editSaveButtonLocator   = "css=input#save"; 
    2019 
    2120# This must match the text in foswiki_tiny.js 
     
    183182} 
    184183 
    185 sub saveAndContinue { 
    186     my $this = shift; 
    187     print STDERR "BrowserEditorInterface::saveAndContinue()\n" if _DEBUG; 
    188  
    189     $this->{_test}->assert(0, "editor not open") 
    190       unless exists $this->{_editorModeForBrowser} 
    191           ->{ $this->{_test}->browserName() }; 
    192  
    193     $this->selectTopFrame(); 
    194     $this->{_test}->selenium->click_ok($editSaveContinueButtonLocator); 
    195  
    196 # The editor can take a while to open, and has to do another server request to convert TML2HTML, so use a longer timeout 
    197     $this->{_test}->selenium->wait_for_element_present( $editFrameLocator, 
    198         2 * $this->{_test}->timeout() ); 
    199     $this->{_test}->selenium->pause() 
    200       ;    # Breathe for a moment; let TMCE settle before doing anything else 
    201  
    202 } 
    203  
    204184sub selectWysiwygEditorFrame { 
    205185    my $this = shift; 
  • branches/Release01x01/WysiwygPlugin/test/unit/WysiwygPlugin/BrowserTranslatorTests.pm

    r10485 r10487  
    477477    $this->{editor}->init(); 
    478478 
    479     # Close the editor because this test uses a different topic 
     479    # Close the editor because this tests uses a different topic 
    480480    if ( $this->{editor}->editorMode() ) { 
    481481        $this->{editor}->cancelEdit(); 
     
    502502        "Before${testText}After\n"); 
    503503    $topicObject->save(); 
    504     $topicObject->finish(); 
    505  
    506     # Reload the topic and note the topic date 
    507     $topicObject = Foswiki::Meta->new( 
    508         $this->{session}, 
    509         $this->{test_web}, 
    510         $topicName); 
    511     $topicObject->load(); 
    512     my $topicinfo = $topicObject->get( 'TOPICINFO' ); 
    513     my $dateBeforeSaveFromEditor = $topicinfo->{date}; 
    514     $this->assert($dateBeforeSaveFromEditor, "Date from topic info before saving from editor"); 
    515     $topicObject->finish(); 
    516504 
    517505    # Open the test topic in the wysiwyg editor 
     
    519507      ->openWysiwygEditor( $this->{test_web}, $topicName ); 
    520508 
    521     # Make sure the topic timestamp is different,  
    522     # so that we can confirm that the save did write to the file 
    523     sleep(1); 
     509    # Write rubbish over the topic, which will be overwritten on save 
     510    $topicObject->text("Rubbish"); 
     511    $topicObject->save(); 
     512    undef $topicObject; 
    524513 
    525514    # Save from the editor 
     
    531520        $this->{test_web}, 
    532521        $topicName); 
    533     $topicObject->load(); 
    534  
    535     # Make sure the topic really was saved 
    536     $topicinfo = $topicObject->get( 'TOPICINFO' ); 
    537     my $dateAfterSaveFromEditor = $topicinfo->{date}; 
    538     $this->assert($dateAfterSaveFromEditor, "Date from topic info after saving from editor"); 
    539     $this->assert_num_not_equals($dateBeforeSaveFromEditor, $dateAfterSaveFromEditor); 
    540522 
    541523    my $text = $topicObject->text(); 
  • branches/Release01x01/WysiwygPlugin/test/unit/WysiwygPlugin/ExtendedTranslatorTests.pm

    r10485 r10487  
    101101          . '&lt;customtag&gt;' 
    102102          . $protectoff 
    103           . 'some &gt;' 
    104           . TranslatorTests::encodedWhitespace('s2') 
    105           . 'text' 
     103          . 'some &gt; text' 
    106104          . $protecton 
    107105          . '&lt;/customtag&gt;' 
    108106          . $protectoff . '</p>', 
    109107        tml      => '<customtag>some >  text</customtag>', 
    110         finaltml => '<customtag>some &gt;  text</customtag>', 
     108        finaltml => '<customtag>some &gt; text</customtag>', 
    111109    }, 
    112110    { 
     
    123121          . '&lt;customtag&gt;' 
    124122          . $protectoff 
    125           . 'some &gt;' 
    126           . TranslatorTests::encodedWhitespace('s2') 
    127           . 'text' 
     123          . 'some &gt; text' 
    128124          . $protecton 
    129125          . '&lt;/customtag&gt;' 
    130126          . $protectoff . '</p>', 
    131127        tml      => '<customtag>some >  text</customtag>', 
    132         finaltml => '<customtag>some &gt;  text</customtag>', 
     128        finaltml => '<customtag>some &gt; text</customtag>', 
    133129    }, 
    134130    { 
  • branches/Release01x01/WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm

    r10486 r10487  
    9494</p> 
    9595HERE 
     96        finaltml => <<'HERE', 
     97Move !ItTest/site/ToWeb5 leaving web5 as !MySQL host 
     98HERE 
    9699    }, 
    97100    { 
     
    108111    }, 
    109112    { 
    110         exec => $ROUNDTRIP, 
    111         name => 'currentWebLinkAtStart', 
    112         tml  => 'Current.LinkAtStart', 
    113         html => $linkon . 'Current.LinkAtStart' . $linkoff, 
     113        exec     => $ROUNDTRIP, 
     114        name     => 'currentWebLinkAtStart', 
     115        tml      => 'Current.LinkAtStart', 
     116        html     => $linkon . 'Current.LinkAtStart' . $linkoff, 
     117        finaltml => 'Current.LinkAtStart', 
    114118    }, 
    115119    { 
     
    147151<b>reminded about${linkon}http://www.koders.com${linkoff}</b> 
    148152HERE 
    149         tml => '*reminded about http://www.koders.com*', 
     153        tml      => '*reminded about http://www.koders.com*', 
     154        finaltml => '*reminded about http://www.koders.com*', 
    150155    }, 
    151156    { 
     
    414419        exec => $ROUNDTRIP | $TML2HTML, 
    415420        name => 'simpleHR', 
    416         html => 
    417 '<hr class="TMLhr"/><hr class="TMLhr" style="{numdashes:7}"/><p>--</p>', 
    418         tml => <<'HERE', 
     421        html => '<hr class="TMLhr"/><hr class="TMLhr"/><p>--</p>', 
     422        tml  => <<'HERE', 
    419423--- 
    420424------- 
     
    424428        finaltml => <<'HERE', 
    425429--- 
    426 ------- 
     430--- 
    427431 
    428432-- 
     
    780784    }, 
    781785    { 
    782         exec => $HTML2TML, 
    783         name => 'squabsWithVars1', 
     786        exec => $ROUNDTRIP, 
     787        name => 'squabsWithVars', 
    784788        html => <<HERE, 
    785 ${linkon}[[wiki syntax]]$linkoff$linkon\[[%MAINWEB%.Wiki users]]${linkoff} 
    786 escaped: 
    787 [${nop}[wiki syntax]] 
    788 HERE 
    789         tml => <<'EVERYWHERE', 
    790 [[wiki syntax]][[%MAINWEB%.Wiki users]] escaped: [<nop>[wiki syntax]] 
    791 EVERYWHERE 
    792     }, 
    793     { 
    794         exec => $ROUNDTRIP, 
    795         name => 'squabsWithVars2', 
    796         html => <<HERE, 
    797 ${linkon}[[wiki syntax]]$linkoff$linkon\[[%MAINWEB%.Wiki users]]${linkoff} 
     789${linkon}[[wiki syntax]]$linkoff$linkon\[[%MAINWEB%.TWiki users]]${linkoff} 
    798790escaped: 
    799791[<nop>[wiki syntax]] 
    800792HERE 
    801793        tml => <<'THERE', 
    802 [[wiki syntax]][[%MAINWEB%.Wiki users]] 
     794[[wiki syntax]][[%MAINWEB%.TWiki users]] 
    803795escaped: 
    804796![[wiki syntax]] 
    805797THERE 
     798        finaltml => <<'EVERYWHERE', 
     799[[wiki syntax]][[%MAINWEB%.TWiki users]] escaped: ![[wiki syntax]] 
     800EVERYWHERE 
    806801    }, 
    807802    { 
     
    827822    }, 
    828823    { 
    829         exec => $ROUNDTRIP, 
    830         name => 'plingedVarOne', 
    831         html => '!<span class="WYSIWYG_PROTECTED">%MAINWEB%</span>nowt', 
    832         tml  => '!%MAINWEB%nowt', 
    833     }, 
    834     { 
    835         exec => $ROUNDTRIP, 
    836         name => 'plingedVarTwo', 
    837         html => 'nowt!<span class="WYSIWYG_PROTECTED">%MAINWEB%</span>', 
    838         tml  => 'nowt!%MAINWEB%', 
     824        exec     => $ROUNDTRIP, 
     825        name     => 'plingedVarOne', 
     826        html     => '!<span class="WYSIWYG_PROTECTED">%MAINWEB%</span>nowt', 
     827        tml      => '!%MAINWEB%nowt', 
     828        finaltml => '!%MAINWEB%nowt', 
     829    }, 
     830    { 
     831        exec     => $ROUNDTRIP, 
     832        name     => 'plingedVarTwo', 
     833        html     => 'nowt!<span class="WYSIWYG_PROTECTED">%MAINWEB%</span>', 
     834        tml      => 'nowt!%MAINWEB%', 
     835        finaltml => 'nowt!%MAINWEB%', 
    839836    }, 
    840837    { 
     
    10101007    }, 
    10111008    { 
    1012         exec => $HTML2TML, 
    1013         name => 'nestedVerbatim1', 
    1014         html => 'Outside 
    1015  <span class="TMLverbatim"><br />&nbsp;Inside<br />&nbsp;</span> Outside', 
    1016         tml => 'Outside <verbatim> 
    1017  Inside 
    1018  </verbatim> Outside', 
    1019     }, 
    1020     { 
    1021         exec => $ROUNDTRIP, 
    1022         name => 'nestedVerbatim2', 
     1009        exec => $ROUNDTRIP, 
     1010        name => 'nestedVerbatim', 
    10231011        html => 'Outside 
    10241012 <span class="TMLverbatim"><br />Inside<br /></span>Outside', 
     
    10281016 </verbatim> 
    10291017 Outside', 
     1018        finaltml => 'Outside <verbatim> 
     1019 Inside 
     1020 </verbatim> Outside', 
    10301021    }, 
    10311022    { 
     
    10871078 Outside 
    10881079 ', 
    1089         finaltml => 'Outside 
    1090     <verbatim> 
     1080        finaltml => 'Outside <verbatim> 
    10911081 Inside 
    1092     </verbatim> 
    1093  Outside', 
    1094     }, 
    1095     { 
    1096         exec => $ROUNDTRIP, 
    1097         name => 'nestedIndentedPre1', 
     1082    </verbatim> Outside', 
     1083    }, 
     1084    { 
     1085        exec => $ROUNDTRIP | $HTML2TML, 
     1086        name => 'nestedIndentedPre', 
    10981087        html => 'Outside 
    10991088 <pre> 
     
    11101099 </pre> 
    11111100Outside', 
    1112     }, 
    1113     { 
    1114         exec => $HTML2TML, 
    1115         name => 'nestedIndentedPre2', 
    1116         html => 'Outside 
    1117  <pre> 
    1118  Inside 
    1119  
    1120 Snide 
    1121  </pre> 
    1122  Outside', 
    1123         tml => 'Outside <pre> 
     1101        finaltml => 'Outside <pre> 
    11241102 Inside 
    11251103 
     
    11401118    }, 
    11411119    { 
    1142         exec => $HTML2TML, 
    1143         name => 'indentedPre1', 
    1144         html => 'Outside<pre> 
    1145  Inside 
    1146     </pre> Outside', 
    1147         tml => 'Outside<pre> 
    1148  Inside 
    1149     </pre> Outside', 
    1150     }, 
    1151     { 
    1152         exec => $ROUNDTRIP, 
    1153         name => 'indentedPre2', 
     1120        exec => $ROUNDTRIP, 
     1121        name => 'indentedPre', 
    11541122        html => 'Outside<pre> 
    11551123Inside 
     
    11601128    </pre> 
    11611129 Outside', 
    1162     }, 
    1163     { 
    1164         exec => $TML2HTML | $ROUNDTRIP, 
    1165         name => 'NAL1', 
     1130        finaltml => 'Outside <pre> 
     1131 Inside 
     1132    </pre> Outside', 
     1133    }, 
     1134    { 
     1135        exec => $TML2HTML | $ROUNDTRIP, 
     1136        name => 'NAL', 
    11661137        html => '<p>Outside 
    11671138 <span class="WYSIWYG_PROTECTED">&lt;noautolink&gt;</span> 
     
    11691140 <span class="WYSIWYG_PROTECTED">&lt;/noautolink&gt;</span> 
    11701141 Outside</p>', 
    1171         tml => 'Outside <noautolink> Inside </noautolink> Outside', 
    1172     }, 
    1173     { 
    1174         exec => $TML2HTML | $ROUNDTRIP, 
    1175         name => 'NAL2', 
    1176         html => '<p>Outside' 
    1177           . encodedWhitespace('ns1') 
    1178           . '<span class="WYSIWYG_PROTECTED">&lt;noautolink&gt;</span>' 
    1179           . encodedWhitespace('ns1') 
    1180           . 'Inside' 
    1181           . encodedWhitespace('ns1') 
    1182           . '<span class="WYSIWYG_PROTECTED">&lt;/noautolink&gt;</span>' 
    1183           . encodedWhitespace('ns1') 
    1184           . 'Outside</p>', 
    11851142        tml => 'Outside 
    11861143 <noautolink> 
     
    11881145 </noautolink> 
    11891146 Outside', 
    1190     }, 
    1191     { 
    1192         exec => $HTML2TML, 
    1193         name => 'classifiedNAL1', 
     1147        finaltml => 'Outside <noautolink> Inside </noautolink> Outside', 
     1148    }, 
     1149    { 
     1150        exec => $TML2HTML | $ROUNDTRIP, 
     1151        name => 'classifiedNAL', 
    11941152        html => '<p>Outside 
    11951153<span class="WYSIWYG_PROTECTED">&lt;noautolink&nbsp;class="foswikiAlert"&gt;</span></p> 
     
    12001158 Outside 
    12011159 </p>', 
    1202         tml => 'Outside <noautolink class="foswikiAlert"> 
    1203    * Inside 
    1204 </noautolink> Outside', 
    1205     }, 
    1206     { 
    1207         exec => $TML2HTML | $ROUNDTRIP, 
    1208         name => 'classifiedNAL2', 
    1209         html => '<p>Outside' 
    1210           . encodedWhitespace('n') 
    1211           . '<span class="WYSIWYG_PROTECTED">&lt;noautolink&nbsp;class="foswikiAlert"&gt;</span></p> 
    1212   <ul> 
    1213    <li> Inside </li> 
    1214   </ul> 
    1215 <p><span class="WYSIWYG_PROTECTED">&lt;/noautolink&gt;</span>' 
    1216           . encodedWhitespace('ns1') . 'Outside 
    1217  </p>', 
    12181160        tml => 'Outside 
    12191161<noautolink class="foswikiAlert"> 
     
    12211163</noautolink> 
    12221164 Outside', 
    1223     }, 
    1224     { 
    1225         exec => $HTML2TML, 
    1226         name => 'indentedNAL1', 
     1165        finaltml => 'Outside <noautolink class="foswikiAlert"> 
     1166   * Inside 
     1167</noautolink> Outside', 
     1168    }, 
     1169    { 
     1170        exec => $ROUNDTRIP, 
     1171        name => 'indentedNAL', 
    12271172        html => 'Outside 
    12281173 <span class="WYSIWYG_PROTECTED">&lt;noautolink&gt;</span> 
     
    12311176 Outside 
    12321177 ', 
    1233         tml => 'Outside <noautolink> Inside </noautolink> Outside', 
    1234     }, 
    1235     { 
    1236         exec => $ROUNDTRIP, 
    1237         name => 'indentedNAL2', 
    1238         tml  => 'Outside 
     1178        tml => 'Outside 
    12391179    <noautolink> 
    12401180 Inside 
     
    12421182 Outside 
    12431183 ', 
    1244         finaltml => 'Outside 
    1245     <noautolink> 
    1246  Inside 
    1247     </noautolink> 
    1248  Outside', 
     1184        finaltml => 'Outside <noautolink> Inside </noautolink> Outside', 
    12491185    }, 
    12501186    { 
     
    12561192    }, 
    12571193    { 
    1258         exec => $HTML2TML, 
    1259         name => 'inlineBreaks', 
    1260         html => 'Zadoc<br />The<br />Priest', 
    1261         tml => 'Zadoc<br />The<br />Priest', 
     1194        exec     => $HTML2TML, 
     1195        name     => 'inlineBreaks', 
     1196        html     => 'Zadoc<br />The<br />Priest', 
     1197        finaltml => 'Zadoc<br />The<br />Priest', 
    12621198    }, 
    12631199    { 
     
    13041240    { 
    13051241        exec => $ROUNDTRIP, 
    1306         name => "WikiTagsInHTMLParam", 
     1242        name => "TWikiTagsInHTMLParam", 
    13071243        html => "${linkon}[[%!page!%/Burble/Barf][Burble]]${linkoff}", 
    13081244        tml  => '[[%!page!%/Burble/Barf][Burble]]', 
     
    15011437${linkon}\[[Sandbox.TestTopic]]${linkoff} 
    15021438HERE 
     1439        finaltml => <<HERE, 
     1440Current.TestTopic Sandbox.TestTopic [[Current.TestTopic]] [[Sandbox.TestTopic]] 
     1441HERE 
    15031442    }, 
    15041443    { 
     
    15151454        html => 
    15161455          "${linkon}[[WebCTPasswords][Resetting a WebCT Password]]${linkoff}", 
     1456        finaltml => '[[WebCTPasswords][Resetting a WebCT Password]]', 
    15171457    }, 
    15181458    { 
     
    15511491</li><li></li><li>y 
    15521492</li></ul>', 
    1553         finaltml => <<"HERE", 
     1493        finaltml => <<'HERE', 
    15541494   * x 
    1555    *$trailingSpace 
     1495   *  
    15561496   * y 
    15571497HERE 
     
    15901530    }, 
    15911531    { 
    1592         exec => $HTML2TML | $ROUNDTRIP, 
     1532        exec => $HTML2TML,    # | $ROUNDTRIP, 
    15931533        name => 'Item4435', 
    15941534        html => <<HTML, 
     
    16311571        exec => $TML2HTML | $HTML2TML | $ROUNDTRIP, 
    16321572        html => '<p> 
    1633 Paraone' 
    1634           . encodedWhitespace('n') . 'Paratwo 
     1573Paraone 
     1574Paratwo 
    16351575</p> 
    16361576<p> 
     
    16481588 
    16491589Parafour', 
    1650         finaltml => 'Paraone 
    1651 Paratwo 
     1590        finaltml => 'Paraone Paratwo 
    16521591 
    16531592Parathree 
     
    17951734<p><span class="WYSIWYG_PROTECTED">&lt;section&gt;</span></p> 
    17961735<h2 class="TML">  B </h2> 
    1797 <p>C' 
    1798           . encodedWhitespace('n') 
    1799           . '<span class="WYSIWYG_PROTECTED">&lt;/section&gt;</span>' 
    1800           . encodedWhitespace('n') . 'X</p> 
     1736<p>C 
     1737<span class="WYSIWYG_PROTECTED">&lt;/section&gt;</span> 
     1738X</p> 
    18011739', 
    18021740        finaltml => <<FGFG, 
     
    18061744---++ B 
    18071745 
    1808 C 
    1809 </section> 
    1810 X 
     1746C </section> X 
    18111747FGFG 
    18121748    }, 
     
    18301766F <i> <b>here</b></i>F 
    18311767XWYZ 
     1768        final_tml => <<ZYX, 
     1769ZYX 
    18321770    }, 
    18331771    { 
     
    23752313No more 
    23762314SPACED 
    2377         html => '<ol> 
    2378 <li> One item' 
    2379           . encodedWhitespace('ns5') . 'spanning several lines 
    2380  
    2381 </li> <li> And another item' 
    2382           . encodedWhitespace('ns1') . 'with one space 
     2315        html => <<DECAPS, 
     2316<ol> 
     2317<li> One item     spanning several lines 
     2318 
     2319</li> <li> And another item with one space 
    23832320</li></ol>  
    23842321<p>No more</p> 
    2385 ', 
     2322DECAPS 
    23862323    }, 
    23872324    { 
     
    24562393Blah 
    24572394BLAH 
    2458         html => '<p> 
    2459 Blah' 
    2460           . encodedWhitespace('n') 
    2461           . '<span class="WYSIWYG_PROTECTED">&#60;a&nbsp;href=&#34;%SCRIPTURLPATH{&#34;edit&#34;}%/%WEB%/%TOPIC%?t=%GM%NOP%TIME{&#34;$epoch&#34;}%&#34;&#62;</span>edit<span 
    2462 class="WYSIWYG_PROTECTED">&#60;/a&#62;</span>' 
    2463           . encodedWhitespace('n') . 'Blah 
    2464 </p> 
    2465 ', 
     2395        html => <<'BLAH', 
     2396<p> 
     2397Blah 
     2398<span class="WYSIWYG_PROTECTED">&#60;a&nbsp;href=&#34;%SCRIPTURLPATH{&#34;edit&#34;}%/%WEB%/%TOPIC%?t=%GM%NOP%TIME{&#34;$epoch&#34;}%&#34;&#62;</span>edit<span 
     2399class="WYSIWYG_PROTECTED">&#60;/a&#62;</span> 
     2400Blah 
     2401</p> 
     2402BLAH 
    24662403    }, 
    24672404    { 
     
    26162553&&gt;&lt;" 
    26172554HERE 
    2618         html => '<p> 
    2619 <span class="WYSIWYG_PROTECTED">&#60;smeg&#62;</span>' 
    2620           . encodedWhitespace('n') 
    2621           . '<pre class="TMLverbatim"><br />&#60;img&nbsp;src=&#34;ball&#38;co&#60;ck&#62;s&#34;&#62;&#38;&#62;&#60;&#34;<br /></pre>' 
    2622           . encodedWhitespace('n') 
    2623           . '&&gt;&lt;" 
    2624 </p> 
    2625 ', 
     2555        html => <<HERE, 
     2556<p> 
     2557<span class="WYSIWYG_PROTECTED">&#60;smeg&#62;</span> 
     2558<pre class="TMLverbatim"><br />&#60;img&nbsp;src=&#34;ball&#38;co&#60;ck&#62;s&#34;&#62;&#38;&#62;&#60;&#34;<br /></pre> 
     2559&&gt;&lt;" 
     2560</p> 
     2561HERE 
     2562        finaltml => <<HERE, 
     2563<smeg> <verbatim> 
     2564<img src="ball&co<ck>s">&><" 
     2565</verbatim> &&gt;&lt;" 
     2566HERE 
    26262567    }, 
    26272568    { 
     
    26292570        exec => $TML2HTML | $ROUNDTRIP, 
    26302571        tml  => <<HERE, 
     2572<pre> 
     2573hello 
     2574there 
     2575</pre> 
     2576HERE 
     2577        finaltml => <<HERE, 
    26312578<pre> 
    26322579hello 
     
    26552602        name => "Item5961", 
    26562603        exec => $HTML2TML | $ROUNDTRIP, 
     2604        html => 'o<strong>n</strong>e', 
    26572605        html => 
    26582606' <strong>zero</strong> <strong>on</strong>e t<strong>w</strong>o t<strong>re</strong>', 
     
    26842632        exec => $TML2HTML | $ROUNDTRIP, 
    26852633        tml  => <<'HERE', 
     2634--- 
     2635 
     2636%SEARCH{search="Sven"}% 
     2637HERE 
     2638        finaltml => <<'HERE', 
    26862639--- 
    26872640 
     
    27642717          . '"}%' 
    27652718          . '</span>' . '</p>' 
    2766     }, 
    2767     { 
    2768         name => "whitespaceEncoding", 
    2769         exec => $TML2HTML | $ROUNDTRIP, 
    2770         tml  => <<'HERE', 
    2771 a  a 
    2772  b 
    2773    * c 
    2774      d 
    2775 e 
    2776 HERE 
    2777         html => '<p>' . 'a' 
    2778           . encodedWhitespace('s2') . 'a' 
    2779           . encodedWhitespace('ns1') . 'b' . '</p>' 
    2780           . '<ul><li>' . 'c' 
    2781           . encodedWhitespace('ns5') . 'd' 
    2782           . '</li></ul>' . '<p>' . 'e' . '</p>', 
    27832719    }, 
    27842720    { 
Note: See TracChangeset for help on using the changeset viewer.