mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -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
|
||||
@user = user
|
||||
@opts = opts || {}
|
||||
pg_clean_up!(opts[:title])
|
||||
pg_clean_up!(opts[:raw])
|
||||
opts[:title] = pg_clean_up(opts[:title]) if opts[:title]
|
||||
opts[:raw] = pg_clean_up(opts[:raw]) if opts[:raw]
|
||||
@spam = false
|
||||
end
|
||||
|
||||
def pg_clean_up!(str)
|
||||
str.gsub!("\u0000", "") if str
|
||||
def pg_clean_up(str)
|
||||
str.gsub("\u0000", "")
|
||||
end
|
||||
|
||||
# True if the post was considered spam
|
||||
|
|
Loading…
Reference in a new issue