[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 21 Nov 2003 18:54:10 -0000


albertel		Fri Nov 21 13:54:10 2003 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - this should squash the repopen of BUG#653 (AT&T blows up)
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.293 loncom/xml/lonxml.pm:1.294
--- loncom/xml/lonxml.pm:1.293	Thu Nov 20 16:43:24 2003
+++ loncom/xml/lonxml.pm	Fri Nov 21 13:54:10 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.293 2003/11/20 21:43:24 albertel Exp $
+# $Id: lonxml.pm,v 1.294 2003/11/21 18:54:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -404,7 +404,9 @@
 	$string=~s/\\ /\\char92 /g;
 	$string=~s/\^/\\\^ /g;
 	$string=~s/\~/\\char126 /g;
-	$string=~s/(&[^A-Za-z\#])/\\$1/g;
+	#fixup & if it doesn't look like
+        # { or α
+	$string=~s/(&(?!((\#[0-9]+)|([a-z]+));))/\\$1/gi;
 	$string=~s/([^&])\#/$1\\#/g;
 	$string=~s/(\$|_|{|})/\\$1/g;
 	$string=~s/\\char92 /\\texttt{\\char92}/g;