Index: trunk/phase3/includes/Math.php |
— | — | @@ -57,16 +57,15 @@ |
58 | 58 | if( function_exists( 'is_executable' ) && !is_executable( $wgTexvc ) ) { |
59 | 59 | return $this->_error( 'math_notexvc' ); |
60 | 60 | } |
61 | | - $delim = wfIsWindows() ? "' '" : ' '; |
62 | | - $cmd = wfEscapeShellArg( $wgTexvc ) . $delim . |
63 | | - wfEscapeShellArg( $wgTmpDirectory ) . $delim . |
64 | | - wfEscapeShellArg( $wgTmpDirectory ) . $delim . |
65 | | - wfEscapeShellArg( $this->tex ) . $delim . |
66 | | - wfEscapeShellArg( $wgInputEncoding ); |
| 61 | + $cmd = $wgTexvc . ' ' . |
| 62 | + escapeshellarg( $wgTmpDirectory ).' '. |
| 63 | + escapeshellarg( $wgTmpDirectory ).' '. |
| 64 | + escapeshellarg( $this->tex ).' '. |
| 65 | + escapeshellarg( $wgInputEncoding ); |
67 | 66 | |
68 | 67 | if ( wfIsWindows() ) { |
69 | 68 | # Invoke it within cygwin sh, because texvc expects sh features in its default shell |
70 | | - $cmd = "sh -c $cmd"; |
| 69 | + $cmd = 'sh -c ' . wfEscapeShellArg( $cmd ); |
71 | 70 | } |
72 | 71 | |
73 | 72 | wfDebug( "TeX: $cmd\n" ); |