Index: trunk/extensions/SubPageList/RELEASE-NOTES |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | |
11 | 11 | * Compatibility fix with MediaWiki 1.18 and later. |
12 | 12 | * Added #subpagecount parser hook. |
| 13 | +* Fixed invalid HTML for ul and ol formats (bug 32131). |
13 | 14 | |
14 | 15 | === Version 0.4 === |
15 | 16 | 2011-07-27 |
Index: trunk/extensions/SubPageList/SubPageList.class.php |
— | — | @@ -344,16 +344,19 @@ |
345 | 345 | $bullet = ''; // String to render between `$start' and item |
346 | 346 | // (may be rendered few times, depends on nesting level). |
347 | 347 | $sep = ''; // String to render between two items. |
| 348 | + $end = ''; // String to render once at the end of the last item. |
348 | 349 | $items = array(); |
349 | 350 | |
350 | 351 | switch ( $parameters['format'] ) { |
351 | 352 | case 'ol' : case 'ordered' : |
352 | 353 | $start = "\n"; |
353 | 354 | $bullet = '#'; |
| 355 | + $end = "\n"; |
354 | 356 | break; |
355 | 357 | case 'ul' : case 'unordered' : |
356 | 358 | $start = "\n"; |
357 | 359 | $bullet = '*'; |
| 360 | + $end = "\n"; |
358 | 361 | break; |
359 | 362 | case 'list' : case 'bar' : |
360 | 363 | $sep = $parameters['separator']; |
— | — | @@ -429,7 +432,7 @@ |
430 | 433 | } |
431 | 434 | } |
432 | 435 | |
433 | | - return implode( $sep, $items ); |
| 436 | + return count( $items ) > 0 ? implode( $sep, $items ) . $end : ''; |
434 | 437 | } |
435 | 438 | |
436 | 439 | /** |