• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4788: $protected underflow

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension WysiwygPlugin Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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 frown

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

ItemTemplate
Summary $protected underflow
ReportedBy TWiki:Main.BuckGolemon
Codebase

SVN Range TWiki-4.3.0, Sat, 06 Oct 2007, build 15172
AppliesTo Extension
Component WysiwygPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:15214 TWikirev:15215
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r6 - 2007-10-09 - BuckGolemon
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback