post-filter.js: prevent extra space characters

prevent extra spaces in comment caused by joining strings with leading
or trailing space.
This commit is contained in:
marktaiwan 2015-03-16 22:36:26 +08:00 committed by czaks
parent 4e27112147
commit 59ee8a990f

View File

@ -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(' ');