X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Ftidy%2FHtml5Depurate.php;h=c6acd661f22d3761eda2602a6f96db0b9fdf728a;hb=12ff4dec05ff8bb1a1910bf6745155b93e1912b5;hp=23e445fa6b8e6f5b86c8878bd4895b2c27b1a4d6;hpb=1b028a6c7491957bb336077fc14bf92d35aa7f73;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/tidy/Html5Depurate.php b/includes/tidy/Html5Depurate.php index 23e445fa6b..c6acd661f2 100644 --- a/includes/tidy/Html5Depurate.php +++ b/includes/tidy/Html5Depurate.php @@ -1,16 +1,17 @@ 'http://localhost:4339/document', 'timeout' => 10, 'connectTimeout' => 0.5, - ) ); + ] ); } public function tidy( $text ) { @@ -18,19 +19,20 @@ class Html5Depurate extends TidyDriverBase { '' . $text . ''; $req = MWHttpRequest::factory( $this->config['url'], - array( + [ 'method' => 'POST', 'timeout' => $this->config['timeout'], 'connectTimeout' => $this->config['connectTimeout'], - 'postData' => array( + 'postData' => [ 'text' => $wrappedtext - ) - ) ); + ] + ] ); $status = $req->execute(); if ( !$status->isOK() ) { - throw new Exception( "Error contacting depurate service: " . $status->getWikiText() ); + throw new Exception( "Error contacting depurate service: " + . $status->getWikiText( false, false, 'en' ) ); } elseif ( $req->getStatus() !== 200 ) { - throw new Exception( "Depurate returned error: " . $status->getWikiText() ); + throw new Exception( "Depurate returned error: " . $status->getWikiText( false, false, 'en' ) ); } $result = $req->getContent(); $startBody = strpos( $result, "" );