mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
need to dup strings, some may be frozen
This commit is contained in:
parent
71644add2f
commit
431def1f52
1 changed files with 4 additions and 4 deletions
|
@ -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 a new issue