Skip to content

Commit

Permalink
Fix #1991 Souci indéfini sur le tsv de la tribune
Browse files Browse the repository at this point in the history
Occurred between 0 and 4 times per day in November 2022
  • Loading branch information
Oumph committed Nov 19, 2022
1 parent e2f3d6a commit f1385d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/board.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ def clean

def remove_control_chars(msg)
sanitized = ""
msg.each_char do |char|
sanitized << char unless char.ascii_only? and (char.ord < 32 or char.ord == 127)
unless msg.nil?
msg.each_char do |char|
sanitized << char unless char.ascii_only? and (char.ord < 32 or char.ord == 127)
end
end
return sanitized
end
Expand Down

0 comments on commit f1385d0

Please sign in to comment.