I just spent too many hours chasing down a bug in 4.1.2 caused by takeOutProtected's use of Translation token getting corrupted by emitTR's use of it.
4.2 has added a tag id to ttakeOutBlocks and takeOutProtected, but not to the collspan code in emitTR - so its still possible to have the problem - but much less likely (ie if a plugin gets into the rendering loop, or if you manage to make a topic with the translationToken.
So I'm going to add a qualifier..
Index: twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm
===================================================================
--- twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm (revision 16166)
+++ twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm (working copy)
@@ -574,7 +574,7 @@
$theRow =~ s/\t/ /go; # change tabs to space
$theRow =~ s/\s*$//o; # remove trailing spaces
- $theRow =~ s/(\|\|+)/$translationToken.length($1)."\|"/geo; # calc COLSPAN
+ $theRow =~ s/(\|\|+)/'colspan'.$translationToken.length($1)."\|"/geo; # calc COLSPAN
my $colCount = 0;
my @row = ();
$span = 0;
@@ -585,7 +585,7 @@
$span = 1;
#AS 25-5-01 Fix to avoid matching also single columns
- if (s/$translationToken([0-9]+)//) {
+ if (s/colspan$translationToken([0-9]+)//) {
$span = $1;
$attr->{colspan} = $span;
}
Index: lib/TWiki/Render.pm
===================================================================
--- lib/TWiki/Render.pm (revision 16166)
+++ lib/TWiki/Render.pm (working copy)
@@ -302,7 +302,7 @@
$theRow =~ s/\t/ /g; # change tabs to space
$theRow =~ s/\s*$//; # remove trailing spaces
- $theRow =~ s/(\|\|+)/$TWiki::TranslationToken.length($1).'|'/ge; # calc COLSPAN
+ $theRow =~ s/(\|\|+)/'colspan'.$TWiki::TranslationToken.length($1).'|'/ge; # calc COLSPAN
my $cells = '';
my $containsTableHeader;
my $isAllTH = 1;
@@ -310,7 +310,7 @@
my @attr;
# Avoid matching single columns
- if ( s/$TWiki::TranslationToken([0-9]+)//o ) {
+ if ( s/colspan$TWiki::TranslationToken([0-9]+)//o ) {
push( @attr, colspan => $1 );
}
s/^\s+$/ /;
--
TWiki:Main/SvenDowideit
- 08 Jan 2008