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

www lon-capa-cvs@mail.lon-capa.org
Tue, 15 Jul 2003 20:47:25 -0000


www		Tue Jul 15 16:47:25 2003 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Bug #1943: <meta> did not work as advertised.
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.153 loncom/xml/londefdef.pm:1.154
--- loncom/xml/londefdef.pm:1.153	Mon Jul 14 10:29:26 2003
+++ loncom/xml/londefdef.pm	Tue Jul 15 16:47:24 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.153 2003/07/14 14:29:26 sakharuk Exp $
+# $Id: londefdef.pm,v 1.154 2003/07/15 20:47:24 www Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -364,11 +364,25 @@
 	    $name=~s/\s/\_/gs;
 	    $name=~s/\W//gs;
 	    if ($name) {
-		$currentstring='<'.$name.'>'.
+		$currentstring='<'.$name;
+                 my $display=&Apache::lonxml::get_param
+		('display',$parstack,$safeeval,undef,1);
+                if ($display) {
+                    $display=~s/\"/\'/g;
+		    $currentstring.=' display="'.$display.'"';
+                }
+		$currentstring.='>'.
 		    &Apache::lonxml::get_param
 			('content',$parstack,$safeeval,undef,1).
 			'</'.$name.'>';
 	    }
+            my $display=&Apache::lonxml::get_param
+		('display',$parstack,$safeeval,undef,1);
+            if ($display) {
+		$display=&HTML::Entities::encode($display);
+		$currentstring.='<'.$name.'.display>'.$display.
+                               '</'.$name.'.display>';
+            }
 	}
     } elsif ($target eq 'tex') {
 	my $content=&Apache::lonxml::get_param('content',$parstack,$safeeval);