diff --git a/contrib/handle_archive/main.php b/contrib/handle_archive/main.php
index e3fe8c25..b2419671 100644
--- a/contrib/handle_archive/main.php
+++ b/contrib/handle_archive/main.php
@@ -58,8 +58,11 @@ class ArchiveFileHandler extends Extension {
}
else {
$tmpfile = $fullpath;
- $list .= "
".html_escape("$subdir/$filename (".str_replace("/", ",", $subdir).")...");
- $error = $this->add_image($tmpfile, $filename, str_replace("/", " ", $subdir));
+ $tags = $subdir;
+ $tags = str_replace("/", " ", $tags);
+ $tags = str_replace("__", " ", $tags);
+ $list .= "
".html_escape("$subdir/$filename (".str_replace(" ", ",", $tags).")...");
+ $error = $this->add_image($tmpfile, $filename, $tags);
if(is_null($error)) {
$list .= "ok\n";
}
diff --git a/ext/bulk_add/main.php b/ext/bulk_add/main.php
index f1371230..e83db71b 100644
--- a/ext/bulk_add/main.php
+++ b/ext/bulk_add/main.php
@@ -59,8 +59,11 @@ class BulkAdd extends Extension {
}
else {
$tmpfile = $fullpath;
- $list .= "
".html_escape("$subdir/$filename (".str_replace("/", ",", $subdir).")...");
- $error = $this->add_image($tmpfile, $filename, str_replace("/", " ", $subdir));
+ $tags = $subdir;
+ $tags = str_replace("/", " ", $tags);
+ $tags = str_replace("__", " ", $tags);
+ $list .= "
".html_escape("$subdir/$filename (".str_replace(" ", ",", $tags).")...");
+ $error = $this->add_image($tmpfile, $filename, $tags);
if(is_null($error)) {
$list .= "ok\n";
}