Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.4

Bug #512 [list] in a [list] breaks the first [list]
Submitted: 2004-01-03 17:40 UTC
From: marduk at k-d-w dot org Assigned: quipo
Status: Closed Package: HTML_BBCodeParser
PHP Version: 4.3.4 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2004-01-03 17:40 UTC] marduk at k-d-w dot org
Description: ------------ If you try to write a [list] into another [list] the level one list is broken Reproduce code: --------------- [list] [*] Subject 1 [list] [*] First [*] Second [/list] [*] Subject 2 [/list] Expected result: ---------------- <ul> <li> Subject 1 </li> <ul> <li> First </li> <li> Second </li> </ul> <li> Subject 2 </li> </ul> Actual result: -------------- <ul> <li> Subject 1 </li> [list] <li> First </li> <li> Second </li> </ul> <li> Subject 2 </li>

Comments

 [2004-01-11 10:33 UTC] sjr at php dot net
Try using the [li] and [/li] tags instead of the [*] shorthand. Input code: ------------- [list] [li] Subject 1 [list] [li] First[/li] [li] Second[/li] [/list][/li] [li] Subject 2[/li] [/list] Actual output code: ------------- <ul> <li> Subject 1 <ol> <li> First</li> <li> Second</li> </ol></li> <li> Subject 2</li> </ul> Expected output code: ------------- <ul> <li> Subject 1 <ul> <li> First</li> <li> Second</li> </ul></li> <li> Subject 2</li> </ul> As you see, this still isn't completely ok. The [list] tag without a type parameter (like 1, a, A), should be replaced by an [ulist] tag by a regexp.
 [2004-01-11 10:39 UTC] sjr at php dot net
The problem with using the [*] shorthand is, that everything following it until there's a newline, is replaced by a regexp with [li]\\1[/li]. By design, the only tag allowed within <ul> and <ol> is <li>. So the second [list] tag isn't allowed, and won't be parsed.
 [2004-04-28 05:11 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-10-18 13:04 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!