From: t dot peter at retepsamoht dot de Operating system: Linux PHP version: 5.2.11 PHP Bug Type: Feature/Change Request Bug description: wrap-tags Config Option in tidy
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> -- Edit bug report at http://bugs.php.net/?id=50074&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50074&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50074&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50074&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50074&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50074&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50074&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50074&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50074&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50074&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50074&r=support Expected behavior: http://bugs.php.net/fix.php?id=50074&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50074&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50074&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50074&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50074&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50074&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50074&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50074&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50074&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50074&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50074&r=mysqlcfg