Hi,

Running the same script from the command line and in a browser generates different results. In the browser a cleaned up HTML string is returned whereas on the command line I get nothing..

Could someone please test the following code in a browser and on a CLI and let me know if they exprerience the same problem? I'm using PHP 4.3.2

Thanks,

Jeroen

<?php
$text =
'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <title></title>
  </head>

  <body bgcolor="#FFFFFF" link="blue" vlink="purple" lang="EN-US">
    <div class="Section1">
      <h1>1. Some title</h1>

      <p><span lang="EN-GB">Some text  </span></p>
    </div>
  </body>
</html>
';

$text = strip_tags($text, '<table><tr><th><td><a><ul><li><ol><p><h1><h2><h3><h4><h5><h6>');
print($text);
print "\n";
?>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to