*** EditTablePlugin.pm.orig Tue May 6 19:19:29 2003
--- EditTablePlugin.pm Tue May 6 19:18:45 2003
***************
*** 47,53 ****
use vars qw(
$web $topic $user $installWeb $VERSION $debug
$query $renderingWeb
! $preSp $header $footer @format $changeRows $helpTopic $nrCols
$encodeStart $encodeEnd $table
);
--- 47,54 ----
use vars qw(
$web $topic $user $installWeb $VERSION $debug
$query $renderingWeb
! $preSp $header $footer @format @formatExpansed
! $changeRows $helpTopic $nrCols
$encodeStart $encodeEnd $table
);
***************
*** 291,296 ****
--- 292,300 ----
# FIXME: *very* crude encoding to escape Wiki rendering inside form fields
$theText =~ s/\./%dot%/gos;
$theText =~ s/(.)/\.$1/gos;
+
+ # convert
markup to unicode linebreak character for text areas
+ $theText =~ s/.<.b.r. .\/.>/
/gos;
return $theText;
}
***************
*** 301,310 ****
$theText =~ s/\.(.)/$1/gos;
$theText =~ s/%dot%/\./gos;
! $theText =~ s/\&([^a-z])/&$1/go; # escape non-entities
! $theText =~ s/\</go; # change < to entity
! $theText =~ s/>/\>/go; # change > to entity
! $theText =~ s/\"/\"/go; # change " to entity
return $theText;
}
--- 305,314 ----
$theText =~ s/\.(.)/$1/gos;
$theText =~ s/%dot%/\./gos;
! $theText =~ s/\&([^#a-z])/&$1/go; # escape non-entities
! $theText =~ s/\</go; # change < to entity
! $theText =~ s/>/\>/go; # change > to entity
! $theText =~ s/\"/\"/go; # change " to entity
return $theText;
}
***************
*** 360,365 ****
--- 364,374 ----
$format[0] = "text,16" unless @format;
$nrCols = @format;
+ # expansed form to be able to use %-vars in format
+ $tFormat =~ s///gos;
+ $tFormat = &TWiki::Func::expandCommonVariables( $tFormat, $theTopic, $theWeb );
+ @formatExpansed = split( /\s*\|\s*/, $tFormat );
+ $formatExpansed[0] = "text,16" unless @formatExpansed;
# FIXME: No handling yet of footer
return "$preSp";
***************
*** 429,447 ****
my $i = @format - 1;
$i = $theCol if( $theCol < $i );
my @bits = split( /,\s*/, $format[$i] );
my $type = "text";
$type = $bits[0] if @bits > 0;
my $size = 0;
$size = $bits[1] if @bits > 1;
my $val = "";
my $sel = "";
if( $type eq "select" ) {
$size = 1 if $size < 1;
! $text = "