Permalink
Browse files

OptimizeChoose: fixed an issue with node iteration over a live tree

  • Loading branch information...
JoshyPHP committed Feb 10, 2016
1 parent 5ac0294 commit e56f871132ab94cb21a1f17d0371babdf3ae68ef
@@ -49,9 +49,9 @@ public function normalize(DOMElement $template)
*/
protected function adoptChildren(DOMElement $branch)
{
foreach ($branch->firstChild->childNodes as $childNode)
while ($branch->firstChild->firstChild)
{
$branch->appendChild($branch->firstChild->removeChild($childNode));
$branch->appendChild($branch->firstChild->removeChild($branch->firstChild->firstChild));
}
$branch->removeChild($branch->firstChild);
}
@@ -117,6 +117,22 @@ public function getData()
<xsl:otherwise><hr/></xsl:otherwise>
</xsl:choose>'
],
[
'<xsl:choose>
<xsl:when><blockquote><br id="a"/></blockquote></xsl:when>
<xsl:otherwise><blockquote><br id="b"/><xsl:choose>
<xsl:when><br id="c"/></xsl:when>
<xsl:otherwise><br id="d"/></xsl:otherwise>
</xsl:choose></blockquote></xsl:otherwise>
</xsl:choose>',
'<blockquote><xsl:choose>
<xsl:when><br id="a"/></xsl:when>
<xsl:otherwise><br id="b"/><xsl:choose>
<xsl:when><br id="c"/></xsl:when>
<xsl:otherwise><br id="d"/></xsl:otherwise>
</xsl:choose></xsl:otherwise>
</xsl:choose></blockquote>'
],
];
}
}

0 comments on commit e56f871

Please sign in to comment.