Re: Editing in a text area field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux