diff --git a/templates/post/fileinfo.html b/templates/post/fileinfo.html
index dc5b7e12..4633f0bc 100644
--- a/templates/post/fileinfo.html
+++ b/templates/post/fileinfo.html
@@ -20,8 +20,7 @@
{% endif %}
{% endif %}
{% if config.show_filename and file.filename %}
- ,
- {% if file.filename|length > config.max_filename_display %}
+ , {% if file.filename|length > config.max_filename_display %}
{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}
{% else %}
{{ file.filename|e|bidi_cleanup }}