There is a case where the $protected variable underflows in
HTML2TML/Node.pm. This causes various formatting errors.
use case:
$tml = "---+ Mario Library Status
| %ICON{\"icon\"}% [[URL][Label]] |
Line 1
Line 2
";
print "\nTML:\n".$tml."\n";
$html = TWiki::Plugins::WysiwygPlugin::TranslateTML2HTML($tml, "", "");
print "\nBACK TO HTML:\n".$html."\n";
$tml = TWiki::Plugins::WysiwygPlugin::TranslateHTML2TML($html, "", "");
print "\nBACK TO TML:\n".$tml."\n";
patch:
foreach my $tml (@regions) {
if ($tml eq $WC::PON) {
$protect++;
next;
} elsif ($tml eq $WC::POFF) {
- $protect-- ;
+ $protect-- if ($protect);
next;
}
--
TWiki:Main/BuckGolemon - 09 Oct 2007
The cause of the unbalanced POFF is down to the _TDtrim on table cells. Just stopping the underflow treats the symptom, but not the disease.
I have modified the TDtrim to leave PON, though I can't think of a simple unit testcase
CC
The cause I found was a table cell with both an %ICON% and a renamed link.
--
TWiki:Main.BuckGolemon - 09 Oct 2007
This is still an issue as of version 15146 (07 Oct 2007)
--
TWiki:Main.BuckGolemon - 09 Oct 2007