[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 19 Mar 2004 22:06:54 -0000
albertel Fri Mar 19 17:06:54 2004 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
- escape \ the most fun character in the world.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.311 loncom/xml/lonxml.pm:1.312
--- loncom/xml/lonxml.pm:1.311 Fri Mar 19 17:01:13 2004
+++ loncom/xml/lonxml.pm Fri Mar 19 17:06:53 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.311 2004/03/19 22:01:13 albertel Exp $
+# $Id: lonxml.pm,v 1.312 2004/03/19 22:06:53 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -408,6 +408,7 @@
$string=~s/([^\\])\&/$1\\\&/g;
$string=~s/([^\\])\#/$1\\\#/g;
} else {
+ $string=~s/\\/\\ensuremath{\\backslash}/g;
$string=~s/([^\\])\%/$1\\\%/g;
$string=~s/([^\\])(\$|_)/$1\\$2/g;
$string=~s/\$\$/\$\\\$/g;