* If tidy isn't able to correct the markup, the original will be
* returned in all its glory with a warning comment appended.
*
* If tidy isn't able to correct the markup, the original will be
* returned in all its glory with a warning comment appended.
*
' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>'.
'<head><title>test</title></head><body>'.$text.'</body></html>';
' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>'.
'<head><title>test</title></head><body>'.$text.'</body></html>';
* @param $text String: HTML to check
* @param $stderr Boolean: Whether to read from STDERR rather than STDOUT
* @param &$retval Exit code (-1 on internal error)
* @param $text String: HTML to check
* @param $stderr Boolean: Whether to read from STDERR rather than STDOUT
* @param &$retval Exit code (-1 on internal error)
*/
private static function execExternalTidy( $text, $stderr = false, &$retval = null ) {
global $wgTidyConf, $wgTidyBin, $wgTidyOpts;
*/
private static function execExternalTidy( $text, $stderr = false, &$retval = null ) {
global $wgTidyConf, $wgTidyBin, $wgTidyOpts;
if( !$stderr && $cleansource == '' && $text != '' ) {
// Some kind of error happened, so we couldn't get the corrected text.
// Just give up; we'll use the source text and append a warning.
if( !$stderr && $cleansource == '' && $text != '' ) {
// Some kind of error happened, so we couldn't get the corrected text.
// Just give up; we'll use the source text and append a warning.
* 'pear install tidy' should be able to compile the extension module.
*/
private static function execInternalTidy( $text, $stderr = false, &$retval = null ) {
* 'pear install tidy' should be able to compile the extension module.
*/
private static function execInternalTidy( $text, $stderr = false, &$retval = null ) {