Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlTidy/html-tidy-logic.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlTidy/html-tidy-logic.php,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlTidy/html-tidy-logic.php 2 Nov 2005 08:56:01 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlTidy/html-tidy-logic.php 11 Nov 2005 20:32:44 -0000 1.2 @@ -11,13 +11,14 @@ // Get the original source $source = $_POST['htisource_name']; $source = stripslashes($source); - + $cwd = str_replace("\\","/",getcwd())."/"; + // Open a tidy process - I hope it's installed! $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w") ); - $process = @proc_open("tidy -utf8 -config html-tidy-config.cfg", $descriptorspec, $pipes); + $process = @proc_open("tidy -utf8 -config {$cwd}html-tidy-config.cfg", $descriptorspec, $pipes); // Make sure the program started and we got the hooks... @@ -54,7 +55,7 @@ } // Split our source into an array by lines - $srcLines = explode("\n",$newsrc); + $srcLines = preg_split("/\n/",$newsrc,-1,PREG_SPLIT_NO_EMPTY); // Get only the lines between the body tags $startLn = 0;