Upgrade to xinha svn head to fix issues with xinha editors not appearing in Firefox 1.5

This commit is contained in:
Chris Morgan
2005-12-07 03:37:36 +00:00
committed by WineHQ
parent 369b40b046
commit 8786179180
175 changed files with 2371 additions and 1919 deletions

View File

@@ -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...
@@ -39,12 +40,22 @@
proc_close($process);
} else {
// Better give them back what they came with, so they don't lose it all...
$newsrc = "<body>\n" .$source. "\n</body>";
/* Use tidy if it's available from PECL */
if( function_exists('tidy_parse_string') )
{
$tempsrc = tidy_parse_string($source);
tidy_clean_repair();
$newsrc = tidy_get_output();
}
else
{
// Better give them back what they came with, so they don't lose it all...
$newsrc = "<body>\n" .$source. "\n</body>";
}
}
// 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;