Ignore:
Timestamp:
10/29/05 14:56:29 (9 years ago)
Author:
gogo
Message:

Apply parts of #417 - namely add cwd and regexp splitting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/HtmlTidy/html-tidy-logic.php

    r394 r410  
    1212        $source = $_POST['htisource_name']; 
    1313        $source = stripslashes($source); 
    14  
     14  $cwd = str_replace("\\","/",getcwd())."/"; 
     15   
    1516        // Open a tidy process - I hope it's installed! 
    1617        $descriptorspec = array( 
     
    1819                1 => array("pipe", "w") 
    1920        ); 
    20         $process = @proc_open("tidy -utf8 -config html-tidy-config.cfg", $descriptorspec, $pipes); 
     21        $process = @proc_open("tidy -utf8 -config {$cwd}html-tidy-config.cfg", $descriptorspec, $pipes); 
    2122 
    2223 
     
    5556 
    5657        // Split our source into an array by lines 
    57         $srcLines = explode("\n",$newsrc); 
     58        $srcLines = preg_split("/\n/",$newsrc,-1,PREG_SPLIT_NO_EMPTY); 
    5859 
    5960        // Get only the lines between the body tags 
Note: See TracChangeset for help on using the changeset viewer.