# Dev-Editor's main program
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-04-16
+# Last modified: 2005-04-22
 #
 
 use strict;
 
  unless(-r $new_physical && -w $new_physical && -x $new_physical)
  {
-  abort($config->{'errors'}->{'dir_no_create'},'/',{DIR => $new_virtual});
+  abort($config->{'errors'}->{'dir_no_create'},'/',{DIR => encode_html($new_virtual)});
  }
 
  # Create the physical and the virtual path
 
  my $physical       = $data->{'physical'};
  my $virtual        = $data->{'virtual'};
  my $dir            = upper_path($virtual);
- my $cgi            = $data->{'cgi'};
 
  return error($config->{'errors'}->{'link_edit'},$dir) if(-l $physical);
  return error($config->{'errors'}->{'dir_edit'}, $dir) if(-d $physical);
    }
   }
 
-  copy($physical,$new_physical) or return error($config->{'errors'}->{'copy_failed'},$dir,{FILE => $virtual, NEW_FILE => $new_virtual});
+  copy($physical,$new_physical) or return error($config->{'errors'}->{'copy_failed'},$dir,{FILE => encode_html($virtual), NEW_FILE => $new_virtual->{'html'}});
   return devedit_reload({command => 'show', file => $new_dir});
  }
  else
 
  $tpl->read_file($tpl_error);
 
  $tpl->fillin('ERROR',$message);
- $tpl->fillin('BACK',$path);
+ $tpl->fillin('BACK',encode_html($path));
  $tpl->fillin('BACK_URL',escape($path));
  $tpl->fillin('SCRIPT',encode_html($ENV{'SCRIPT_NAME'}));