MediaWiki REL1_30
Html5Internal.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Tidy;
4
6 private $balancer;
7 public function __construct( array $config ) {
8 parent::__construct( $config + [
9 'strict' => true,
10 'tidyCompat' => true,
11 ] );
12 $this->balancer = new Balancer( $this->config );
13 }
14
15 public function tidy( $text ) {
16 return $this->balancer->balance( $text );
17 }
18}
An implementation of the tree building portion of the HTML5 parsing spec.
tidy( $text)
Clean up HTML.
Base class for HTML cleanup utilities.