From 59ee8a990f67298326628f2bf6a9e65fb1bb3cea Mon Sep 17 00:00:00 2001 From: marktaiwan Date: Mon, 16 Mar 2015 22:36:26 +0800 Subject: [PATCH] post-filter.js: prevent extra space characters prevent extra spaces in comment caused by joining strings with leading or trailing space. --- js/post-filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/post-filter.js b/js/post-filter.js index 518e38bb..8eb3ab7d 100644 --- a/js/post-filter.js +++ b/js/post-filter.js @@ -425,7 +425,7 @@ if (active_page === 'thread' || active_page === 'index' || active_page === 'cata array = $post.find('.body').contents().filter(function () {if ($(this).text() !== '') return true;}).toArray(); array = $.map(array, function (ele) { - return $(ele).text(); + return $(ele).text().trim(); }); comment = array.join(' ');