At 9:02 AM -0500 1/11/09, Eric Butera wrote:
I tried using tidy to clean up some of that stuff but it was giving me
even more problems.  I enjoyed having valid docs with all the crap
ripped out, but I use my editor blocks on lots of different parts of
the site, so having it remove/combine style tags was really annoying.
I'd really like to revisit this problem again, but unfortunately I've
got other more pressing issues so this always seems to fall to the
back burner.

I've tried stripping out all Gremlins, like so:

<?php
function removeGremlins($str)
   {
   for ($i=0; $i < strlen($str); $i++)   // remove gremlins
      {
      $char = ord($str[$i]);
      if (($char < 32 || $char > 126))
         {
         $a .= "";
         }
      else
         {
         $a .= $str[$i];
         }
      }
   return $a;
   }
?>

And then strip_tags() --  it's a start.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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

Reply via email to