From: Aryeh Gregor Date: Mon, 29 Nov 2010 00:10:59 +0000 (+0000) Subject: Revert r42257 "Convert literal tabs to when passing them through Tidy, to preven... X-Git-Tag: 1.31.0-rc.0~33697 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=57b42fb1c065b05ec6fba036698c1086fd3c87c5;p=lhc%2Fweb%2Fwiklou.git Revert r42257 "Convert literal tabs to when passing them through Tidy, to prevent them from being clobbered." This caused bug 16108, and also broke the patch to bug 3276. The commit doesn't explain why it's useful or what it fixes, although Platonides asked on Code Review in 2008, so that's two problems it's caused with no benefits I've seen. --- diff --git a/includes/parser/Tidy.php b/includes/parser/Tidy.php index 3e436c8539..49f5d0b433 100644 --- a/includes/parser/Tidy.php +++ b/includes/parser/Tidy.php @@ -31,9 +31,6 @@ class MWTidy { ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'. 'test'.$text.''; - # Tidy is known to clobber tabs; convert them to entities - $wrappedtext = str_replace( "\t", ' ', $wrappedtext ); - if( $wgTidyInternal ) { $correctedtext = self::execInternalTidy( $wrappedtext ); } else { @@ -44,9 +41,6 @@ class MWTidy { return $text . "\n\n"; } - # Convert the tabs back from entities - $correctedtext = str_replace( ' ', "\t", $correctedtext ); - return $correctedtext; }