From 801801f69ddbc249447a12abce2d23f744300936 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 17 Sep 2008 12:36:44 +0000 Subject: [PATCH] Bah, revert to r40753 --- includes/Math.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/includes/Math.php b/includes/Math.php index a21527ba09..ca225d6c22 100644 --- a/includes/Math.php +++ b/includes/Math.php @@ -57,16 +57,15 @@ class MathRenderer { if( function_exists( 'is_executable' ) && !is_executable( $wgTexvc ) ) { return $this->_error( 'math_notexvc' ); } - $delim = wfIsWindows() ? "' '" : ' '; - $cmd = wfEscapeShellArg( $wgTexvc ) . $delim . - wfEscapeShellArg( $wgTmpDirectory ) . $delim . - wfEscapeShellArg( $wgTmpDirectory ) . $delim . - wfEscapeShellArg( $this->tex ) . $delim . - wfEscapeShellArg( $wgInputEncoding ); + $cmd = $wgTexvc . ' ' . + escapeshellarg( $wgTmpDirectory ).' '. + escapeshellarg( $wgTmpDirectory ).' '. + escapeshellarg( $this->tex ).' '. + escapeshellarg( $wgInputEncoding ); if ( wfIsWindows() ) { # Invoke it within cygwin sh, because texvc expects sh features in its default shell - $cmd = "sh -c $cmd"; + $cmd = 'sh -c ' . wfEscapeShellArg( $cmd ); } wfDebug( "TeX: $cmd\n" ); -- 2.20.1