[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /xml londefdef.pm
raeburn
raeburn@source.lon-capa.org
Thu, 18 Nov 2010 18:07:03 -0000
raeburn Thu Nov 18 18:07:03 2010 EDT
Modified files: (Branch: version_2_9_X)
/loncom/xml londefdef.pm
Log:
- Backport 1.426.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.403.4.3 loncom/xml/londefdef.pm:1.403.4.4
--- loncom/xml/londefdef.pm:1.403.4.3 Sat Nov 13 01:43:01 2010
+++ loncom/xml/londefdef.pm Thu Nov 18 18:07:02 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.403.4.3 2010/11/13 01:43:01 raeburn Exp $
+# $Id: londefdef.pm,v 1.403.4.4 2010/11/18 18:07:02 raeburn Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -2703,14 +2703,20 @@
sub cell_config_hash {
my ($align, $rowspan, $colspan, $width) = @_;
+ if ($rowspan ne '') {
+ $rowspan =~ s/^\s+|\s+$//g;
+ }
+ if ($colspan ne '') {
+ $colspan =~ s/^\s+|\s+$//g;
+ }
my %config;
if ($align ne '') {
$config{'halign'} = $align;
}
- if ($colspan ne "") {
+ if (($colspan =~ /^\d+$/) && ($colspan > 0)) {
$config{'colspan'} = $colspan;
}
- if ($rowspan ne '') {
+ if (($rowspan =~ /^\d+$/) && ($rowspan > 0)) {
$config{'rowspan'} = $rowspan;
}
if ($width ne '') {