Escape ampersand as well
authorJoey Schulze <joey@infodrom.org>
Fri, 23 Mar 2012 20:15:41 +0000 (21:15 +0100)
committerJoey Schulze <joey@infodrom.org>
Fri, 23 Mar 2012 20:15:41 +0000 (21:15 +0100)
utils.php

index d6905e9..3476ccf 100644 (file)
--- a/utils.php
+++ b/utils.php
@@ -24,8 +24,8 @@ function rm_tempdir($dir)
 
 function latex_encode($text)
 {
 
 function latex_encode($text)
 {
-  return str_replace(array("\\",'%'),
-                    array('\\','\%'),
+  return str_replace(array("\\",'%','&'),
+                    array('\\','\%','\&'),
                     utf8_decode($text));
 }
 
                     utf8_decode($text));
 }