phpquery解析html的错误 有哪位高手知道怎么回事吗

phpquery解析html有错误,网页代码为

 <div class="a">
    a
    <p style="color:green;">
        <p style="font-size:16px;">b</p>
        c
    </p>
    d
    <p style="background:green;">e</p>
    f
</div>

通过pq($doc)->htmlOuter();输出后的代码就变成了



<div class="a">
    a
    <p style="color:green;">
        </p>
<p style="font-size:16px;">b</p>
        c

    d
    <p style="background:green;">e</p>
    f
</div>

知道原因了,是因为p元素不能嵌套块级元素引起的。