diff -uN /home/dgingrich/src/wordpress_plugins/wp-validator/wp-validator.php wp-validator/wp-validator.php
--- /home/dgingrich/src/wordpress_plugins/wp-validator/wp-validator.php 2007-05-11 00:12:30.000000000 -0400
+++ wp-validator/wp-validator.php 2008-03-16 23:09:42.396894000 -0400
@@ -2,8 +2,8 @@
/*
Plugin Name: WordPress XHTML validator
Plugin URI: http://rudd-o.com/projects/wp-validator/
-Description: Validates posts, pages and comments against XHTML 1.0 — Usage instructions — Don't forget to join the Truly Valid campaign today!
-Version: 1.0.0
+Description: Validates posts, pages and comments against XHTML 1.0 — Usage instructions — Don't forget to join the Truly Valid campaign today! Hack by DAG: 2008-03-16 - Set stream_set_blocking in run_content_through_tidy to prevent hanging on certain posts.
+Version: 1.0.1
Author: Manuel Amador (Rudd-O)
Author URI: http://rudd-o.com/
*/
@@ -195,6 +195,7 @@
fwrite($pipes[0], $content);
fclose($pipes[0]);
+ stream_set_blocking($pipes[2], 0); // stderr sometimes hangs
while(!feof($pipes[1]) || !feof($pipes[2])) {
if (!feof($pipes[1])) $stdout .= fgets($pipes[1], 1024);
if (!feof($pipes[2])) $stderr .= fgets($pipes[2], 1024);