need to dup strings, some may be frozen
This commit is contained in:
parent
71644add2f
commit
431def1f52
|
@ -54,13 +54,13 @@ class PostCreator
|
||||||
# If we don't do this we introduce a rather risky dependency
|
# If we don't do this we introduce a rather risky dependency
|
||||||
@user = user
|
@user = user
|
||||||
@opts = opts || {}
|
@opts = opts || {}
|
||||||
pg_clean_up!(opts[:title])
|
opts[:title] = pg_clean_up(opts[:title]) if opts[:title]
|
||||||
pg_clean_up!(opts[:raw])
|
opts[:raw] = pg_clean_up(opts[:raw]) if opts[:raw]
|
||||||
@spam = false
|
@spam = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def pg_clean_up!(str)
|
def pg_clean_up(str)
|
||||||
str.gsub!("\u0000", "") if str
|
str.gsub("\u0000", "")
|
||||||
end
|
end
|
||||||
|
|
||||||
# True if the post was considered spam
|
# True if the post was considered spam
|
||||||
|
|
Loading…
Reference in New Issue