Use wfEscapeShellArg() since it works on windows (bug 13518)
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 12 Sep 2008 15:10:27 +0000 (15:10 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 12 Sep 2008 15:10:27 +0000 (15:10 +0000)
includes/Math.php

index ca225d6..f6c869c 100644 (file)
@@ -58,14 +58,14 @@ class MathRenderer {
                                return $this->_error( 'math_notexvc' );
                        }
                        $cmd = $wgTexvc . ' ' .
-                                       escapeshellarg( $wgTmpDirectory ).' '.
-                                       escapeshellarg( $wgTmpDirectory ).' '.
-                                       escapeshellarg( $this->tex ).' '.
-                                       escapeshellarg( $wgInputEncoding );
+                                       wfEscapeShellArg( $wgTmpDirectory ).' '.
+                                       wfEscapeShellArg( $wgTmpDirectory ).' '.
+                                       wfEscapeShellArg( $this->tex ).' '.
+                                       wfEscapeShellArg( $wgInputEncoding );
 
                        if ( wfIsWindows() ) {
                                # Invoke it within cygwin sh, because texvc expects sh features in its default shell
-                               $cmd = 'sh -c ' . wfEscapeShellArg( $cmd );
+                               $cmd = 'sh -c ' . wfwfEscapeShellArg( $cmd );
                        }
 
                        wfDebug( "TeX: $cmd\n" );