note 51196 deleted from ref.tidy by nlopess

From: Date: Mon, 05 Sep 2005 14:33:55 +0000
Subject: note 51196 deleted from ref.tidy by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-94753@lists.php.net to get a copy of this message
Note Submitter: acuthbert at gcdtech dot com ---- If you need to tidy Word 2000/XP/2003 'HTML' you may need to run it through the following regular expressions first: $reg = "</?[[:alpha:]]+:[[:alnum:]]+[^>]*>"; $html = ereg_replace($reg,"",$html); $reg = "</?\?[^>]*>"; $html = ereg_replace($reg,"",$html); We found tidy fell over when it hit XML PI's and other Word junk which the above should remove.

« previous php.notes (#94753) next »