Services: Convert MWLBFactory's static to a const now HHVM is gone
[lhc/web/wiklou.git] / includes / diff / TableDiffFormatter.php
index 14307b5..845c2bc 100644 (file)
@@ -38,15 +38,14 @@ class TableDiffFormatter extends DiffFormatter {
        }
 
        /**
-        * @static
         * @param string $msg
         *
         * @return mixed
         */
        public static function escapeWhiteSpace( $msg ) {
-               $msg = preg_replace( '/^ /m', '  ', $msg );
-               $msg = preg_replace( '/ $/m', '  ', $msg );
-               $msg = preg_replace( '/  /', '  ', $msg );
+               $msg = preg_replace( '/^ /m', "\u{00A0} ", $msg );
+               $msg = preg_replace( '/ $/m', " \u{00A0}", $msg );
+               $msg = preg_replace( '/  /', "\u{00A0} ", $msg );
 
                return $msg;
        }
@@ -124,7 +123,7 @@ class TableDiffFormatter extends DiffFormatter {
         * @return string
         */
        protected function contextLine( $line ) {
-               return $this->wrapLine( ' ', 'diff-context', $line );
+               return $this->wrapLine( "\u{00A0}", 'diff-context', $line );
        }
 
        /**
@@ -147,7 +146,7 @@ class TableDiffFormatter extends DiffFormatter {
         * @return string
         */
        protected function emptyLine() {
-               return '<td colspan="2">&#160;</td>';
+               return "<td colspan=\"2\">\u{00A0}</td>";
        }
 
        /**