Edit report at http://bugs.php.net/bug.php?id=54364&edit=1
ID: 54364
Comment by: mcamden at rubicon dot com
Reported by: mcamden at rubicon dot com
Summary: Tidy doesn't merge-spans regardless of setting
Status: Open
Type: Bug
Package: Tidy
Operating System: Windows 7
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
I'm not sure if this is related, but the same is true for merge-divs.
Script:
$html = '<p><div><div><div>a</div></div></div></p>';
$config = array('merge-spans' => TRUE);
$tidy = tidy_parse_string($html, $config, 'UTF8');
$tidy->cleanRepair();
echo $tidy;
Result:
<p><div><div><div>a</div></div></div></p>
Previous Comments:
------------------------------------------------------------------------
[2011-03-23 23:47:43] mcamden at rubicon dot com
Description:
------------
Tidy does not merge spans regardless of the configuration. According to
the tidy
website the merge-spans configuration option is defaulted to 'auto'. PHP
reflects
this setting with the number 2. However leaving it defaulted to 'auto'
or setting
to TRUE does not merge spans.
Test script:
---------------
$html = '<p><span><span><span>a</span></span></span></p>';
$config = array('merge-spans' => TRUE);
$tidy = tidy_parse_string($html, $config, 'UTF8');
$tidy->cleanRepair();
echo $tidy;
Expected result:
----------------
<p><span>a</span></p>
Actual result:
--------------
<p><span><span><span>a</span></span></span></p>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54364&edit=1