FEATURE: normalize whitespaces in topic title/post content

This commit is contained in:
Régis Hanol
2014-08-12 00:01:58 +02:00
parent 996d14965e
commit f4208ae83f
4 changed files with 22 additions and 1 deletions

View File

@ -203,6 +203,8 @@ class PostCreator
end
def setup_post
@opts[:raw] = TextCleaner.normalize_whitespaces(@opts[:raw]).strip
post = @topic.posts.new(raw: @opts[:raw],
user: @user,
reply_to_post_number: @opts[:reply_to_post_number])