You are here: Foswiki>Tasks Web>Item12570 (19 Nov 2013, GeorgeClark)Edit Attach

Item12570: Ordered Lists: type= needs to be removed and replaced with style="list-style-type:"

Priority: Urgent
Current State: Closed
Released In: 1.1.9
Target Release: patch
Applies To: Engine
Component: FoswikiRender
Branches: Release01x01 trunk
Reported By: CalebSG
Waiting For:
Last Change By: GeorgeClark
Perhaps the conversation from the IRC channel would be easiest to describe the issue:
[11:13] <CalebSG> Sorry to post again on this but am wondering if help might be available. In IE10, open and scroll down to the Numbered List section. The alphabetical numbered list doesn't render properly.
[11:13] <CalebSG> I'm assuming this affects others as well, just don't have immediate access to other PC's to test at present.
[11:54] <@CDot> CalebSG: sorry, without IE10 to test I can't confirm. However since numbering is generated server side, the browser should be irrelevant
[11:55] <@CDot> of course I don't know what "properly" means in this context.
[12:02] <CalebSG> CDot: it's been too long since I've been on the browser side of web development, but I am wondering if the HTML is not well-formed and if IE10 is least forgiving of this.
[12:02] <CalebSG> properly means that instead of appearing as an ordered list of a., b., c., it is showing up as a round bullet.
[12:03] <@CDot> it's well formed, but the type= attribute that it uses is deprecated.
[12:03] <@CDot> so IE may be unilaterally deciding to ignore it
[12:05] <@CDot> list styles have moved to CSS, but the code hasn't :-(
[12:06] <CalebSG> I see.
[12:07] <CalebSG> should I be recording the issue somewhere on the foswiki site?
[12:08] <@CDot> yes, please raise a Task in Tasks web
[12:08] <@CDot> it should say "type= needs to be removed and replaced with style="list-style-type:"
[12:09] <@CDot> set it as "urgent"
[12:09] <@CDot> then fix it and check in :-)
[12:16] <CalebSG> LOL, I wish I was that good :-)
[12:19] <@CDot> CalebSG: patch is here:
[12:19] <@CDot> you can paste it into the task when it's ready

-- CalebSG - 23 Aug 2013

---   (revision 16847)
+++   (working copy)
@@ -62,6 +62,13 @@
 <span class="foswikiNewLink">$text<a href="%SCRIPTURLPATH{"edit"}%/$web/$topic?topicparent=%WEB%.%TOPIC%" rel="nofollow" title="%MAKETEXT{"Create this topic"}%">?</a></span>
+my %list_types = (
+    A => 'upper-alpha',
+    a => 'lower-alpha',
+    i => 'lower-roman',
+    I => 'upper-roman'
+    );
     # Do a dynamic 'use locale' for this module
@@ -440,12 +447,12 @@
                 $isList = 1;
             elsif ( $line =~ m/^((\t|   )+)([1AaIi]\.|\d+\.?) ?/ ) {
                 # Numbered list
                 my $ot = $3;
                 $ot =~ s/^(.).*/$1/;
                 if ( $ot !~ /^\d$/ ) {
-                    $ot = ' type="' . $ot . '"';
+                   # Use style="list-type-type:"
+                    $ot = ' style="list-style-type:' . $list_types{$ot} . '"';
                 else {
                     $ot = '';

Topic revision: r10 - 19 Nov 2013, GeorgeClark - This page was cached on 26 Oct 2016 - 15:29.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License