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

Bug #12619 Tab character before # causes invalid Xhtml
Submitted: 2007-12-05 12:48 UTC
From: wildpossum Assigned: justinpatrin
Status: Closed Package: Text_Wiki (version 1.2.0)
PHP Version: 5.2.0 OS: Linux but irrelevant
Roadmaps: 1.3.0    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 33 + 31 = ?

 
 [2007-12-05 12:48 UTC] wildpossum (Ken Yap)
Description: ------------ The presence of a tab before the # character instead of a space causes Text::Wiki to generate invalid unbalanced Xhtml. Test script: --------------- <?php require_once 'PEAR.php'; require_once 'Text/Wiki.php'; $source = <<<EOS Keeping copies of your postings * To create a list of all postings made during the semester: \t# click on ‘All My Posts’ \t# you can then print them or download them as a file on your computer. EOS; $wiki = Text_Wiki::singleton('Default'); $wiki->setFormatConf('Xhtml', array('translate'=>2, 'quotes'=>'ENT_COMPAT', 'charset'=>'UTF-8')); echo "Bad output\n", $wiki->transform($source, 'Xhtml'); $newsource = str_replace("\t", ' ', $source); echo "Good output\n", $wiki->transform($newsource, 'Xhtml'); ?> Expected result: ---------------- The output following Bad output should be the same as the output following Good output and be balanced Xhtml. Actual result: -------------- The two outputs are different, and the Bad output is invalid unbalanced Xhtml.

Comments

 [2007-12-08 08:54 UTC] justinpatrin (Justin Patrin)
This happend because the default Prefilter turns \t into ' ' (4 spaces) and the List parser expects an exact number of spaces to be used.
 [2007-12-17 16:14 UTC] justinpatrin (Justin Patrin)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Please test with various lists.