dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "CSSMin: Fix breaking of quoted urls with outer spacing" into REL1_31
[lhc/web/wiklou.git]
/
includes
/
tidy
/
Html5Depurate.php
diff --git
a/includes/tidy/Html5Depurate.php
b/includes/tidy/Html5Depurate.php
index
e2187f0
..
c6acd66
100644
(file)
--- a/
includes/tidy/Html5Depurate.php
+++ b/
includes/tidy/Html5Depurate.php
@@
-7,11
+7,11
@@
use Exception;
class Html5Depurate extends TidyDriverBase {
public function __construct( array $config ) {
class Html5Depurate extends TidyDriverBase {
public function __construct( array $config ) {
- parent::__construct( $config +
array(
+ parent::__construct( $config +
[
'url' => 'http://localhost:4339/document',
'timeout' => 10,
'connectTimeout' => 0.5,
'url' => 'http://localhost:4339/document',
'timeout' => 10,
'connectTimeout' => 0.5,
-
)
);
+
]
);
}
public function tidy( $text ) {
}
public function tidy( $text ) {
@@
-19,19
+19,20
@@
class Html5Depurate extends TidyDriverBase {
'<body>' . $text . '</body></html>';
$req = MWHttpRequest::factory( $this->config['url'],
'<body>' . $text . '</body></html>';
$req = MWHttpRequest::factory( $this->config['url'],
- array(
+ [
'method' => 'POST',
'timeout' => $this->config['timeout'],
'connectTimeout' => $this->config['connectTimeout'],
'method' => 'POST',
'timeout' => $this->config['timeout'],
'connectTimeout' => $this->config['connectTimeout'],
- 'postData' =>
array(
+ 'postData' =>
[
'text' => $wrappedtext
'text' => $wrappedtext
- )
-
)
);
+ ]
+
]
);
$status = $req->execute();
if ( !$status->isOK() ) {
$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 ) {
} 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, "<body>" );
}
$result = $req->getContent();
$startBody = strpos( $result, "<body>" );