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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 15 Apr 2004 20:18:47 -0000


albertel		Thu Apr 15 16:18:47 2004 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - the tag  <annoy)guy> is valid. :-)
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.316 loncom/xml/lonxml.pm:1.317
--- loncom/xml/lonxml.pm:1.316	Mon Apr 12 18:55:59 2004
+++ loncom/xml/lonxml.pm	Thu Apr 15 16:18:46 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.316 2004/04/12 22:55:59 albertel Exp $
+# $Id: lonxml.pm,v 1.317 2004/04/15 20:18:46 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -460,7 +460,7 @@
 	    #clear out any tags that didn't end
 	    while ($token->[1] ne $$stack['-1'] && ($#$stack > -1)) {
 		my $lasttag=$$stack[-1];
-		if ($token->[1] =~ /^$lasttag$/i) {
+		if ($token->[1] =~ /^\Q$lasttag\E$/i) {
 		    &Apache::lonxml::warning('Using tag &lt;/'.$token->[1].'&gt; on line '.$token->[3].' as end tag to &lt;'.$$stack[-1].'&gt;');
 		    last;
 		} else {
@@ -1047,7 +1047,7 @@
            my $anchorname=$_;
 	   my $matchthis=$anchorname;
            $matchthis=~s/\_+/\\s\+/g;
-           $result=~s/($matchthis)/\<font color=\"red\"\>$1\<\/font\>/gs;
+           $result=~s/(\Q$matchthis\E)/\<font color=\"red\"\>$1\<\/font\>/gs;
        }
     }
     if ($ENV{'form.link'}) {
@@ -1055,14 +1055,14 @@
            my ($anchorname,$linkurl)=split(/\>/,$_);
 	   my $matchthis=$anchorname;
            $matchthis=~s/\_+/\\s\+/g;
-           $result=~s/($matchthis)/\<a href=\"$linkurl\"\>$1\<\/a\>/gs;
+           $result=~s/(\Q$matchthis\E)/\<a href=\"$linkurl\"\>$1\<\/a\>/gs;
        }
     }
     if ($ENV{'form.anchor'}) {
         my $anchorname=$ENV{'form.anchor'};
 	my $matchthis=$anchorname;
         $matchthis=~s/\_+/\\s\+/g;
-        $result=~s/($matchthis)/\<a name=\"$anchorname\"\>$1\<\/a\>/s;
+        $result=~s/(\Q$matchthis\E)/\<a name=\"$anchorname\"\>$1\<\/a\>/s;
         $result.=(<<"ENDSCRIPT");
 <script type="text/javascript">
     document.location.hash='$anchorname';