|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60224 div nesting in html docs
Submitted: 2011-11-05 13:50 UTC Modified: 2021-07-13 14:05 UTC
From: indy at spikehead dot co dot uk Assigned:
Status: Analyzed Package: Doc Build problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
10 + 19 = ?
Subscribe to this entry?

 [2011-11-05 13:50 UTC] indy at spikehead dot co dot uk
I've been looking at the "alpha" or "beta" epub docs (depending what you call them). These are failing on my ereader, and after pushing the epub through a validator, there are a lot element errors. These are present on the HTML pages as well.

Basically these are all nested elements (div, ul, p) within a P tag (which you can't do). The code snippet below is from the "What is PHP page". Around half of the occurances are this simple and the enclosing p tag removed.

There are a lot of others where there are several instances of incorrect nesting in a paragraph, which need the closing p tag moving to the correct location.

Test script:
   <p class="para">
    <div class="example" id="example-1">
     <div class="info"><p><b>Example #1 An introductory example</b></p></div>
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
&lt;!DOCTYPE&nbsp;HTML&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN"<br />&nbsp;&nbsp;&nbsp;&nbsp;""&gt;<br />&lt;html&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;head&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Example&lt;/title&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/head&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;body&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Hi,&nbsp;I'm&nbsp;a&nbsp;PHP&nbsp;script!"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">?&gt;<br /></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/body&gt;<br />&lt;/html&gt;</span>



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-13 14:05 UTC]
-Status: Open +Status: Analyzed
 [2021-07-13 14:05 UTC]
PhD renders <para> as <p> instead of the appropriate <div> (or
maybe <section>).  This cannot be easily changed, because the docs
use <para> all the time, albeit <simpara> would be more
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 25 08:01:30 2024 UTC