Project

General

Profile

Actions

Defect #10642

closed

Nested textile ol/ul lists generate invalid HTML

Added by Hansen Ler over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Projects
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

My Project Description is as follows:

To track issue:
# Click on the *New Issue* link on top.
# Specify the *Tracker* as _Bug_ or _Feature_
** _Bug_ is a problem to fix.
** _Feature_ is new enhancement to the version
# Enter _Subject_ and _Description_
** For hyperlink reference to existing feature/bug, you can use the *#XX*
e.g. Bug #100 will create a link to the bug.

If I've got more than one Projects in Projects view, the next Project item (e.g. My Project 2) in the list will break.

See attached image.


Files

Bullet-issue.png (134 KB) Bullet-issue.png Hansen Ler, 2012-04-11 12:43
projects.png (4.58 KB) projects.png Jean-Philippe Lang, 2012-04-13 19:13
Actions #1

Updated by Etienne Massip over 12 years ago

  • Status changed from New to Confirmed
  • Target version set to Candidate for next minor release

Even lost the end of the text.

Actions #2

Updated by Jean-Philippe Lang over 12 years ago

Can't reproduce with current trunk. Tested with default and classic themes, using FF11.0, Chrome 18 or IE9.

Actions #3

Updated by Hansen Ler over 12 years ago

Maybe there's some fix in between? Let me test when there's new release...
that's super fast response from jean! Cheers!

Actions #4

Updated by Etienne Massip over 12 years ago

No, I reproduced with trunk but with only a part of the text you posted.

Actions #5

Updated by Jean-Philippe Lang over 12 years ago

Etienne Massip wrote:

No, I reproduced with trunk but with only a part of the text you posted.

Which part exactly?

Actions #6

Updated by Etienne Massip over 12 years ago

Well, the last part I think but I'll check again.

Actions #7

Updated by Jean-Philippe Lang over 12 years ago

  • Description updated (diff)

Got it.

Actions #8

Updated by Jean-Philippe Lang over 12 years ago

This is a textile issue. This text generates invalid html (closing tags at the end are in reverse order).

Here is a patch that fixes it:

Index: lib/redcloth3.rb
===================================================================
--- lib/redcloth3.rb    (revision 9405)
+++ lib/redcloth3.rb    (working copy)
@@ -585,9 +585,10 @@
                     last_line = line_id
                 end
                 if line_id - last_line > 1 or line_id == lines.length - 1
-                    depth.delete_if do |v|
+                    depth.reverse.each do |v|
                         lines[last_line] << "</li>\n\t</#{ lT( v ) }l>" 
                     end
+                    depth = []
                 end
             end
             lines.join( "\n" )
Actions #9

Updated by Jean-Philippe Lang over 12 years ago

  • Target version changed from Candidate for next minor release to 1.4.1
Actions #10

Updated by Jean-Philippe Lang over 12 years ago

  • Subject changed from If your Project Description uses bullets, viewing Projects page will cause the next project in list to Break to Nested textile ol/ul lists genrate invalid HTML
  • Status changed from Confirmed to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r9430.

Actions #11

Updated by Etienne Massip over 12 years ago

  • Subject changed from Nested textile ol/ul lists genrate invalid HTML to Nested textile ol/ul lists generate invalid HTML

Typo.

Actions #12

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from Resolved to Closed

Merged.

Actions

Also available in: Atom PDF