diff --git a/lib/post_creator.rb b/lib/post_creator.rb index 089d13f61db..9b869749b0b 100644 --- a/lib/post_creator.rb +++ b/lib/post_creator.rb @@ -54,8 +54,8 @@ class PostCreator # If we don't do this we introduce a rather risky dependency @user = user @opts = opts || {} - opts[:title] = pg_clean_up(opts[:title]) if opts[:title] - opts[:raw] = pg_clean_up(opts[:raw]) if opts[:raw] + opts[:title] = pg_clean_up(opts[:title]) if opts[:title] && opts[:title].include?("\u0000") + opts[:raw] = pg_clean_up(opts[:raw]) if opts[:raw] && opts[:raw].include?("\u0000") @spam = false end