summaryrefslogtreecommitdiff
path: root/www/wiki/includes/tidy/Html5Internal.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/includes/tidy/Html5Internal.php')
-rw-r--r--www/wiki/includes/tidy/Html5Internal.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/www/wiki/includes/tidy/Html5Internal.php b/www/wiki/includes/tidy/Html5Internal.php
new file mode 100644
index 00000000..4ad82002
--- /dev/null
+++ b/www/wiki/includes/tidy/Html5Internal.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace MediaWiki\Tidy;
+
+class Html5Internal extends TidyDriverBase {
+ private $balancer;
+ public function __construct( array $config ) {
+ parent::__construct( $config + [
+ 'strict' => true,
+ 'tidyCompat' => true,
+ ] );
+ $this->balancer = new Balancer( $this->config );
+ }
+
+ public function tidy( $text ) {
+ return $this->balancer->balance( $text );
+ }
+}