Re: Editing in a text area field

From: Date: Sun, 11 Jan 2009 14:59:22 +0000
Subject: Re: Editing in a text area field
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-286024@lists.php.net to get a copy of this message
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

« previous php.general (#286024) next »