Thread 'Problem with code/quote BBCodes in lists'

Message boards : Web interfaces : Problem with code/quote BBCodes in lists
Message board moderation

To post messages, you must log in.

AuthorMessage
Thyme Lawn

Send message
Joined: 2 Sep 05
Posts: 103
United Kingdom
Message 17379 - Posted: 19 May 2008, 16:09:15 UTC
Last modified: 19 May 2008, 16:27:43 UTC

If a list item starts with a multiple line code or quote BBCode directive it isn't handled correctly. The special formatting is only applied to the first line, with all subsequent lines being formatted with just the list item indent. In addition, when you do a post preview everything after the first broken line appears outside the preview box, giving the impression that the post has been truncated.

  • This code directive works as expected.

    First line.
    Second line.

  • As does this quote directive.
    First line.
    Second line.

  • First line.
    Second line (appears to be outside the code block but it wasn't).

    This line and everything after it appears outside the preview box.
  • First line.
    Second line (appears to be outside the quote block but it wasn't)

    This list item is not bulleted in post preview (because it's outside the highlighted preview box?).


Edit: opened Trac ticket 622.


"The ultimate test of a moral society is the kind of world that it leaves to its children." - Dietrich Bonhoeffer
ID: 17379 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 17380 - Posted: 19 May 2008, 16:54:31 UTC - in response to Message 17379.  
Last modified: 19 May 2008, 16:55:01 UTC

I just clicked Reply, removed the top and bottom [quote] tags, and preview seemed to work as expected (ie. same as on your actual post). So: cannot reproduce the preview bug.
ID: 17380 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 17381 - Posted: 19 May 2008, 16:59:07 UTC - in response to Message 17380.  

I just clicked Reply, removed the top and bottom [quote] tags, and preview seemed to work as expected (ie. same as on your actual post). So: cannot reproduce the preview bug.

Actually, it's causing some code to appear inside the <ul> element but outside any <li>. That is invalid HTML, so probably my browser (Konqueror) is handling it differently from yours. I'll try Firefox.

(content inside ul but outside li = undefined behavior, so browsers could do *anything* upon finding such invalid code... including rendering the whole webpage upside down if they want to; see undefined behavior on Wikipedia)

ID: 17381 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 17382 - Posted: 19 May 2008, 17:07:58 UTC - in response to Message 17381.  

Actually, it's causing some code to appear inside the <ul> element but outside any <li>. That is invalid HTML, so probably my browser (Konqueror) is handling it differently from yours.

Confirmed, Firefox shows it all messed up.

The second line of the showing up outside the code block is caused by even worse invalid code (improperly nested tags: <li><code></li></code> that kind of overlapping is forbidden). It shows in a separate line in Firefox, not in Konqueror. (Again, browsers would be allowed by spec to do anything with that invalid code, like delete those elements completely, draw a totally blank page, or set the computer on fire.)

ID: 17382 · Report as offensive
Thyme Lawn

Send message
Joined: 2 Sep 05
Posts: 103
United Kingdom
Message 17384 - Posted: 19 May 2008, 18:06:32 UTC

Thanks for those tests Nicolas. Should have mentioned I was using Firefox.

Just tried IE and it's fine except for the positioning of the list item bullets.

For the second code block it appears on the second line just before the code block.

For the second quote block it is on the first line without any indent.
"The ultimate test of a moral society is the kind of world that it leaves to its children." - Dietrich Bonhoeffer
ID: 17384 · Report as offensive

Message boards : Web interfaces : Problem with code/quote BBCodes in lists

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.