Index: gsdl/trunk/perllib/plugins/HTMLPlugin.pm
===================================================================
--- gsdl/trunk/perllib/plugins/HTMLPlugin.pm	(revision 16934)
+++ gsdl/trunk/perllib/plugins/HTMLPlugin.pm	(revision 16935)
@@ -619,12 +619,7 @@
 	my $utf8_link = "";
 	$self->decode_text($link,$encoding,$language,\$utf8_link);
-###	my $utf8_url_encoded_link = &unicode::url_encode($utf8_link);
 
 	$self->{'utf8_to_original_filename'}->{$utf8_link} = $url_original_filename;
-###	$self->{'utf8_to_original_filename'}->{$utf8_url_encoded_link} = $url_original_filename;
-
-#	print STDERR "**** Storing block link: $link\n";
-#	print STDERR "**** URL original filename: $url_original_filename\n";
-	print STDERR "**** utf8_encoded_link to original src filename:\n\t$utf8_link\n\t".$self->{'utf8_to_original_filename'}->{$utf8_link}."\n";
+#	print STDERR "**** utf8_encoded_link to original src filename:\n\t$utf8_link\n\t".$self->{'utf8_to_original_filename'}->{$utf8_link}."\n";
 
 	$block_hash->{'file_blocks'}->{$url_original_filename} = 1;
@@ -707,6 +702,4 @@
     # links, so even if 'file_is_url' is off, still need to store info
 
-#    print STDERR "#### file: $file\n";
-
     my ($tailname,$dirname,$suffix) = &File::Basename::fileparse($file, "\\.[^\\.]+\$");
     my $utf8_file = $self->filename_to_utf8_metadata($file);
@@ -719,5 +712,4 @@
 	$web_url = $web_url.$utf8_file;
     }
-#    print STDERR "#### weburl: $web_url\n";
 
     $doc_obj->add_utf8_metadata($cursection, "URL", $web_url);
@@ -1004,7 +996,5 @@
     my $img_file =  $self->add_file ($href, $rl, $hash_part, $base_dir, $doc_obj, $section);
 
-#    print STDERR "**** link = $link\n";
-#    print STDERR "**** href = $href\n";
-#    print STDERR "**** img_file = $img_file\n";
+#    print STDERR "**** link = $link\n**** href = $href\n**** img_file = $img_file\n";
 
     my $anchor_name = $img_file;
@@ -1050,17 +1040,8 @@
     # This is more complicated than it sounds when char encodings
     # is taken in to account
-##    &unicode::ensure_utf8(\$link);
-##    $link = &unicode::url_encode($link);
-#    print STDERR "#### filepath: ".&util::filename_cat($base_dir,$file)."\n";
-#    print STDERR "#### link: $link\n";
-
     my ($href, $hash_part, $rl) = $self->format_link ($link, $base_dir, $file);
-#    print STDERR "#### href: $href\n";
  
     # href may use '\'s where '/'s should be on Windows
     $href =~ s/\\/\//g;
-
-##    $href = &unicode::url_decode($href);
-#    print STDERR "#### href again: $href\n";
     my ($filename) = $href =~ m/^(?:.*?):(?:\/\/)?(.*)/;
     
@@ -1105,11 +1086,8 @@
 
     $filename = &util::filename_cat($base_dir, $filename);
-#    print STDERR "**** filename: $filename\n";
     # Replace %XX's in URL with decoded value if required. Note that the filename may include the %XX in some
     # situations. If the *original* file's name was in URL encoding, the following method will not decode it.
     my $utf8_filename = $filename;
-#    print STDERR "*** filename before URL decoding: $filename\n";
     $filename = $self->opt_url_decode($utf8_filename);
-#    print STDERR "*** filename after URL decoding:  $filename\n\n";
 
     # some special processing if the intended filename was converted to utf8, but
@@ -1118,5 +1096,4 @@
 	# try the original filename stored in map
 	my $original_filename = $self->{'utf8_to_original_filename'}->{$filename};
-#	print STDERR "*** missing: $filename" unless defined $original_filename; #StrangeNoGraphicData in word doc
 	if (defined $original_filename && -e $original_filename) {
 	    $filename = $original_filename;
@@ -1156,10 +1133,8 @@
 	    ($newname) = $utf8_filename =~ m/([^\/\\]*)$/;
 	}
-#	print STDERR "Before url encoding newname: $newname\n";
+
 	# Make sure this name uses only ASCII characters 
 	# => use URL encoding, as it preserves original encoding
 	$newname = &unicode::url_encode($newname);
-#	print STDERR "After url encoding newname: $newname\n";
-#	print STDERR "*** Real name and converted filename:\n\t$filename\n\t$newname\n";
 
 	$doc_obj->associate_file($filename, $newname, undef, $section);
@@ -1253,6 +1228,4 @@
 	    $before_hash = &util::filename_cat($dirname, $before_hash);
 	    $before_hash = $self->eval_dir_dots($before_hash);	    	    
-	    
-#	    print STDERR "#### before_hash: $before_hash\n";
 	}
 
