--- loncom/xml/lonxml.pm	2005/06/09 02:12:26	1.375
+++ loncom/xml/lonxml.pm	2005/06/29 19:02:14	1.379
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.375 2005/06/09 02:12:26 albertel Exp $
+# $Id: lonxml.pm,v 1.379 2005/06/29 19:02:14 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -180,8 +180,8 @@ sub xmlend {
 	$status=$Apache::inputtags::status[-1]; 
     }
     my $discussion;
-    &Apache::loncommon::get_unprocessed_cgi
-        ($env{'query_string'},['LONCAPA_INTERNAL_no_discussion']);
+    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
+					   ['LONCAPA_INTERNAL_no_discussion']);
     if (! exists($env{'form.LONCAPA_INTERNAL_no_discussion'}) ||
         $env{'form.LONCAPA_INTERNAL_no_discussion'} ne 'true') {
         $discussion=&Apache::lonfeedback::list_discussion($mode,$status);
@@ -397,6 +397,7 @@ sub latex_special_symbols {
 	$string=~s/\\\%|\%/\\\%/g;
 	$string=~s/\\{|{/\\{/g;
 	$string=~s/\\}|}/\\}/g;
+	$string=~s/\\ensuremath\\{\\backslash\\}/\\ensuremath{\\backslash}/g;
 	$string=~s/\\\$|\$/\\\$/g;
 	$string=~s/\\\_|\_/\\\_/g;
         $string=~s/([^\\]|^)(\~|\^)/$1\\$2\\strut /g;
@@ -1065,7 +1066,7 @@ sub parstring {
 
 sub writeallows {
     unless ($#extlinks>=0) { return; }
-    my $thisurl='/res/'.&Apache::lonnet::declutter(shift);
+    my $thisurl = &Apache::lonnet::clutter(shift);
     if ($env{'httpref.'.$thisurl}) {
 	$thisurl=$env{'httpref.'.$thisurl};
     }