diff --git a/contrib/bulk_add/main.php b/contrib/bulk_add/main.php
index 65e420f3..3be92067 100644
--- a/contrib/bulk_add/main.php
+++ b/contrib/bulk_add/main.php
@@ -70,13 +70,14 @@ class BulkAdd extends Extension {
$tags = $subdir;
$tags = str_replace("/", " ", $tags);
$tags = str_replace("__", " ", $tags);
- $list .= "
".html_escape("$subdir/$filename (".str_replace(" ", ",", $tags).")...");
+ $tags = trim($tags);
+ $list .= "
".html_escape("$subdir/$filename (".str_replace(" ", ", ", $tags).")... ");
$error = $this->add_image($tmpfile, $filename, $tags);
if(is_null($error)) {
$list .= "ok\n";
}
else {
- $list .= "failed: $error\n";
+ $list .= "failed:
$error\n";
}
}
}