--- loncom/publisher/lonpubdir.pm	2006/12/06 22:22:39	1.98
+++ loncom/publisher/lonpubdir.pm	2007/04/20 01:17:24	1.102
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.98 2006/12/06 22:22:39 albertel Exp $
+# $Id: lonpubdir.pm,v 1.102 2007/04/20 01:17:24 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -211,16 +211,18 @@ sub startpage {
 						 {'body_title' =>
 						      $pagetitle,}));
     } else {
-	$r->print(&Apache::loncommon::start_page('Construction Space',undef));
+	$r->print(&Apache::loncommon::start_page('Construction Space',undef,
+						 { 'only_body' => 1,}));
 	$r->print($pagetitle);
     }
 
+    my $esc_thisdisfn = &Apache::loncommon::escape_single($thisdisfn);
     my $pubdirscript=(<<ENDPUBDIRSCRIPT);
 <script type="text/javascript">
-top.document.title = '$thisdisfn/ - LON-CAPA Construction Space';
+top.document.title = '$esc_thisdisfn/ - LON-CAPA Construction Space';
 // Store directory location for menu bar to find
 
-parent.lastknownpriv='/~$uname$thisdisfn/';
+parent.lastknownpriv='/~$uname$esc_thisdisfn/';
 
 // Confirmation dialogues
 
@@ -609,7 +611,6 @@ sub putresource {
 	$title = '<a href="/res/'.$targetdir.'/'.$filename.
 	    '.meta" target="cat">'.
 	    &getTitleString($targetdir.'/'.$filename).'</a>';
-	&Apache::lonnet::logthis("same $same meta $meta_same");
 	if ($same) {
 	    if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
                 $pubstatus = 'obsolete';
@@ -716,7 +717,7 @@ sub create_pubselect {
 <input type="hidden" name="filename" value="/~'.
  &HTML::Entities::encode($uname.$thisdisfn.'/'.$filename,'<>&"').'" />
  <input type="hidden" name="dispfilename" value="'.
- &HTML::Entities::encode($filename).'"</form>';
+ &HTML::Entities::encode($filename).'" /></form>';
     $$numres ++;
 }