|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-20 09:54 UTC] jani@php.net
-Package: Feature/Change Request
+Package: Tidy
[2012-01-21 11:39 UTC] nlopess@php.net
-Status: Open
+Status: Bogus
[2012-01-21 11:39 UTC] nlopess@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 04:00:01 2025 UTC |
Description: ------------ I?d really like to have a config option in tidy_parse_string() that enables/disables wraps within tags. This would make code reading much easier, especially for HTML/PHP Beginners. Reproduce code: --------------- --- From manual page: book.tidy --- <?php $html = '<div id="mainmenu"><span class="active">Home</span>| <a href="planung.php" title="Planung">Planung</a>| <a href="audio.php" title="Audio">Audio</a>| <a href="video.php" title="Video">Video</a>| <a href="netzwerk.php" title="Netzwerk">Netzwerk</a>| <a href="service.php" title="Service">Service</a>| <a href="shop.php" title="Shop">Shop</a>| <a href="referenzen.php" title="Referenzen">Referenzen</a>| <a href="kontakt.php" title="Kontakt">Kontakt</a>| <a href="impressum.php" title="Impressum">Impressum</a>| <a href="agbs.php" title="AGBs">AGBs</a></div>'; $config = array('indent' => TRUE, 'output-xhtml' => TRUE, 'wrap' => 200); $tidy = tidy_parse_string($html, $config); print_r($tidy->getConfig()); ?> Expected result: ---------------- No breaks within tags. Nice and easy to read. <div id="mainmenu"> <span class="active">Home</span>| <a href="planung.php" title="Planung">Planung</a>| <a href="audio.php" title="Audio">Audio</a>| <a href="video.php" title="Video">Video</a>| <a href="netzwerk.php" title="Netzwerk">Netzwerk</a>| <a href="service.php" title="Service">Service</a>| <a href="shop.php" title="Shop">Shop</a>| <a href="referenzen.php" title="Referenzen">Referenzen</a>| <a href="kontakt.php" title="Kontakt">Kontakt</a>| <a href="impressum.php" title="Impressum">Impressum</a>| <a href="agbs.php" title="AGBs">AGBs</a> </div> Actual result: -------------- Something like that: Breaks within tags. <div id="mainmenu"> <span class="active">Home</span>| <a href="planung.php" title="Planung">Planung</a>| <a href="audio.php" title="Audio">Audio</a>| <a href="video.php" title="Video">Video</a>| <a href="netzwerk.php" title="Netzwerk">Netzwerk</a>| <a href="service.php" title="Service">Service</a>| <a href="shop.php" title="Shop">Shop</a>| <a href="referenzen.php" title="Referenzen">Referenzen</a>| <a href="kontakt.php" title="Kontakt">Kontakt</a>| <a href="impressum.php" title="Impressum">Impressum</a>| <a href="agbs.php" title="AGBs">AGBs</a> </div>