SID-01233: Deprecated Ordered List spec
Status: |
Answered |
TWiki version: |
5.0.2 |
Perl version: |
5.8.8 |
Category: |
CategoryAPI |
Server OS: |
AIX 5.3 |
Last update: |
11 years ago |
Hello. I'm having a problem with (non-numeric) ordered lists using IE8 (running in IE7 compat mode). They don't work, and I'm not sure if it's because the "type" attribute is deprecated, or it it's something else. I've crudely patched it on my system in
Render.pm with the following:
Old code:
elsif ( $line =~ m/^((\t| )+)([1AaIi]\.|\d+\.?) ?/ ) {
# Numbered list
my $ot = $3;
$ot =~ s/^(.).*/$1/;
if( $ot !~ /^\d$/ ) {
$ot = ' type="'.$ot.'"';
} else {
$ot = '';
}
$line =~ s/^((\t| )+)([1AaIi]\.|\d+\.?) ?/<li$ot> /;
_addListItem( $this, \@result, 'ol', 'li', $1 );
$isList = 1;
}
New code:
elsif ( $line =~ m/^((\t| )+)([1AaIi]\.|\d+\.?) ?/ ) {
# Numbered list
my $ot = $3;
$ot =~ s/^(.).*/$1/;
if( $ot !~ /^\d$/ ) {
if( $ot =~ /^A$/ ) {
$ot = ' style="list-style-type:upper-alpha"';
} elsif( $ot =~ /^a$/ ) {
$ot = ' style="list-style-type:lower-alpha"';
} elsif( $ot =~ /^I$/ ) {
$ot = ' style="list-style-type:upper-roman"';
} elsif( $ot =~ /^i$/ ) {
$ot = ' style="list-style-type:lower-roman"';
} else {
#$ot = ' type="'.$ot.'"';
$ot = '';
}
} else {
$ot = '';
}
$line =~ s/^((\t| )+)([1AaIi]\.|\d+\.?) ?/<li$ot> /;
_addListItem( $this, \@result, 'ol', 'li', $1 );
$isList = 1;
}
Like I said, crude. Would you verify if this is a bug? Thanks.
--
AaronLWalker - 2011-07-14
Discussion and Answer
This looks like a sensible fix. Could you create a bug item and check this in to SVN trunk and 5.0 branch?
--
PeterThoeny - 2011-07-14
This has been fixed and released in TWiki-5.1.2, see
TWikibug:Item6921.
--
PeterThoeny - 2012-10-23
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.