X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Ftidy%2FRemexCompatFormatter.php;h=abc98baab4b2d7e3410fe15535890ec6ac5c299d;hb=5074ec954b4ce3890a27562163d3a7a7c7bc3495;hp=c8a715b1834a143acf8f630bb5208c60a8e261e1;hpb=237d3271fd313ebe09858a5c442a91216a7b61cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/tidy/RemexCompatFormatter.php b/includes/tidy/RemexCompatFormatter.php index c8a715b183..abc98baab4 100644 --- a/includes/tidy/RemexCompatFormatter.php +++ b/includes/tidy/RemexCompatFormatter.php @@ -18,9 +18,9 @@ class RemexCompatFormatter extends HtmlFormatter { public function __construct( $options = [] ) { parent::__construct( $options ); - $this->attributeEscapes["\xc2\xa0"] = ' '; + $this->attributeEscapes["\u{00A0}"] = ' '; unset( $this->attributeEscapes["&"] ); - $this->textEscapes["\xc2\xa0"] = ' '; + $this->textEscapes["\u{00A0}"] = ' '; unset( $this->textEscapes["&"] ); } @@ -40,10 +40,10 @@ class RemexCompatFormatter extends HtmlFormatter { $name = $node->name; $attrs = $node->attrs; - if ( isset( self::$markedEmptyElements[$name] ) && $attrs->count() === 0 ) { - if ( strspn( $contents, "\t\n\f\r " ) === strlen( $contents ) ) { - return "<{$name} class=\"mw-empty-elt\">$contents"; - } + if ( isset( self::$markedEmptyElements[$name] ) && $attrs->count() === 0 + && strspn( $contents, "\t\n\f\r " ) === strlen( $contents ) + ) { + return "<{$name} class=\"mw-empty-elt\">$contents"; } $s = "<$name";