PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Wiki_Mediawiki » Bug #7392

table structure is parsed incorrectly

Details

Submitted2006-04-13 16:02 UTC
Fromsurfchen at gmail dot com
Assignedritzmo
StatusClosed
PackageText_Wiki_Mediawiki
PHP Version5.1.2
OSUbuntu
Roadmaps(Not assigned)

Comments

[2006-04-13 16:02 UTC] surfchen at gmail dot com

Description:
------------
if there is not enough space stand by the | ,the table stucture will not be parsed correctly as you expect.

Test script:
---------------
header("Content-Type:text/html;charset=utf8");
require_once 'Text/Wiki.php';
$str='{| border="1" cellpadding="5" cellspacing="0"
|-
! item1 || item2 || item3
|-
| rowspan=2| A
| colspan=2 align="center"| B
|-
| colspan=2 align="center"| L
|}';;
$parser="Mediawiki";
$wiki = & Text_Wiki::singleton($parser);
$wiki->setRenderConf('xhtml', 'code', 'css_filename', 'codefilename');
$render='Xhtml';
$mWiki = $wiki->transform($str, $render);
echo $mWiki;

Expected result:
----------------
this $str is parsed correctly.note that the space before |A, |B and | L,which does not exist in the Test script above
{| border="1" cellpadding="5" cellspacing="0"
|-
! item1 || item2 || item3
|-
| rowspan=2 | A
| colspan=2 align="center" | B
|-
| colspan=2 align="center" | L
|}

Actual result:
--------------
some table html which I did not expect.

[2006-04-13 17:05 UTC] ritzmo at php dot net

Could you please test the current CVS?
Should be fixed.

[2006-04-14 14:13 UTC] surfchen at gmail dot com

I do a cvs updating and it works.