From a92bb182d91ae98b2a2bc7787d5650050868f1f1 Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Tue, 2 Apr 2013 17:28:04 +0800 Subject: Fix display issues with RTL control characters in post names, subjects, and filenames. --- templates/post_reply.html | 8 ++++---- templates/post_thread.html | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'templates') diff --git a/templates/post_reply.html b/templates/post_reply.html index ddd0afd4..c5735a0e 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -7,14 +7,14 @@ {% if post.subject|length > 0 %} {# show subject #} - {{ post.subject }} + {{ post.subject|bidi_cleanup }} {% endif %} {% if post.email|length > 0 %} {# start email #} {% endif %} {% set capcode = post.capcode|capcode %} - {{ post.name }} + {{ post.name|bidi_cleanup }} {% if post.trip|length > 0 %} {{ post.trip }} {% endif %} @@ -66,9 +66,9 @@ {% if config.show_filename and post.filename %} , {% if post.filename|length > config.max_filename_display %} - {{ post.filename|truncate(config.max_filename_display) }} + {{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }} {% else %} - {{ post.filename }} + {{ post.filename|bidi_cleanup }} {% endif %} {% endif %} ) diff --git a/templates/post_thread.html b/templates/post_thread.html index cf93bed0..d7a62d4f 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -22,11 +22,11 @@ {% endif %} {% if config.show_filename and post.filename %} , - {% if post.filename|length > config.max_filename_display %} - {{ post.filename|truncate(config.max_filename_display) }} - {% else %} - {{ post.filename }} - {% endif %} + {% if post.filename|length > config.max_filename_display %} + {{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }} + {% else %} + {{ post.filename|bidi_cleanup }} + {% endif %} {% endif %} )