Escape the caret under Windows, since that's a special character for cmd shell.
authorPlatonides <platonides@users.mediawiki.org>
Wed, 3 Mar 2010 18:18:15 +0000 (18:18 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 3 Mar 2010 18:18:15 +0000 (18:18 +0000)
Bug 13518 -  <math> does not work (wrong shell escaping under Windows)

includes/Math.php

index 8cf9b8d..af0a64a 100644 (file)
@@ -67,7 +67,7 @@ class MathRenderer {
 
                        if ( wfIsWindows() ) {
                                # Invoke it within cygwin sh, because texvc expects sh features in its default shell
-                               $cmd = 'sh -c ' . wfEscapeShellArg( $cmd );
+                               $cmd = 'sh -c ' . wfEscapeShellArg( str_replace( "^", "^^", $cmd ) );
                        }
 
                        wfDebug( "TeX: $cmd\n" );