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

Bug #6292 headings and hr are incorrectly nested in p-tags
Submitted: 2005-12-19 15:28 UTC Modified: 2006-12-16 02:46 UTC
From: wolfgang dot illmeyer at gmx dot net Assigned: justinpatrin
Status: Closed Package: Text_Wiki
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2005-12-19 15:28 UTC] wolfgang dot illmeyer at gmx dot net
Description: ------------ There's an error in the XHTML Renderer concerning the placement of <p>-Tags when used with headings or <hr />. Headings and <hr /> are not allowed to be nested in <p>-tags. This is a problem when using markup like " this is a test + heading test 2 ---- test3 " This will lead to XHTML validation failures. There will also be <br /> Tags added in front of the Heading and the <hr />-tags, which is not intended, I guess. The only way to work around this without touching the code is changing the markup to " this is a test + heading test 2 ---- test3 " As a temporary workaround I meanwhile changed the "prefilter" rule of my local copy by adding $this->wiki->source = str_replace("\n----\n","\n\n----\n\n", $this->wiki->source); $this->wiki->source = preg_replace("/\n(\\+{1,6}) (.*)\n/m", "\n\n\\1 \\2\n\n", $this->wiki->source); before the stripping of the unnecessary triple-\n's

Comments

 [2006-12-08 03:31 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. Thanks for the patch.