--- rat/lonpage.pm 2000/11/13 18:15:54 1.17 +++ rat/lonpage.pm 2001/08/30 21:00:46 1.26 @@ -5,13 +5,15 @@ # # 05/29/00,05/30 Gerd Kortemeyer) # 08/30,08/31,09/06,09/14,09/15,09/16,09/19,09/20,09/21,09/23, -# 10/02,10/10,10/14,10/16,10/18,10/19,10/31,11/6 Gerd Kortemeyer +# 10/02,10/10,10/14,10/16,10/18,10/19,10/31,11/6,11/14,11/16, +# 08/13/01,08/30 Gerd Kortemeyer package Apache::lonpage; use strict; use Apache::Constants qw(:common :http); use Apache::lonnet(); +use Apache::lonxml(); use HTML::TokeParser; use GDBM_File; @@ -263,7 +265,7 @@ sub handler { $output=~s/\]*\>//gsi; $output=~s/\<\/form[^\>]*\>//gsi; $output=~ - s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*(\w+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi; + s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*([\w\.\:]+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi; } $thisdir=~s/\/[^\/]*$//; map { @@ -274,7 +276,8 @@ sub handler { $output=~s/(\"|\'|\=\s*)$_(\"|\'|\s|\>)/$1$newlocation$2/; } } @rlinks; - $output=~s/\<\s*applet/\]+)(codebase\=[^\S\>]+)*([^\>]*)\>/$1.($2?$2:' codebase="'.$thisdir.'"').$3.'>'/gei; $ssibody{$_}=$output; # ---------------------------------------------------------------- End SSI cell } @@ -300,15 +303,21 @@ sub handler { } # ------------------------------------------------------------------------ Head $r->print("\n\n".$allmeta); + $allscript=~ + s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs; if ($allscript) { - $r->print("\n\n"); + $r->print("\n\n"); } + $r->print(&Apache::lonxml::registerurl(1)); $r->print("\n\n"); # ------------------------------------------------------------------ Start body if ($isxml) { $r->print($xmlbody); } else { - $r->print(''); + $r->print( + ''); } # ------------------------------------------------------------------ Start form if ($nforms) { @@ -368,7 +377,7 @@ sub handler { ''); } - $r->print(''); + $r->print(''.&Apache::lonxml::xmlend()); # -------------------------------------------------------------------- End page } # ------------------------------------------------------------- End render page