Defect #10642
closed
Nested textile ol/ul lists generate invalid HTML
Added by Hansen Ler over 12 years ago.
Updated over 12 years ago.
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. ![](/attachments/download/7449/Bullet-issue.png)
Files
- Status changed from New to Confirmed
- Target version set to Candidate for next minor release
Even lost the end of the text.
Can't reproduce with current trunk. Tested with default and classic themes, using FF11.0, Chrome 18 or IE9.
![](/attachments/download/7461/projects.png)
Maybe there's some fix in between? Let me test when there's new release...
that's super fast response from jean! Cheers!
No, I reproduced with trunk but with only a part of the text you posted.
Etienne Massip wrote:
No, I reproduced with trunk but with only a part of the text you posted.
Which part exactly?
Well, the last part I think but I'll check again.
- Description updated (diff)
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" )
- Target version changed from Candidate for next minor release to 1.4.1
- 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
- Subject changed from Nested textile ol/ul lists genrate invalid HTML to Nested textile ol/ul lists generate invalid HTML
- Status changed from Resolved to Closed
Also available in: Atom
PDF