diff --git a/sgx-bwmsgsv2.rb b/sgx-bwmsgsv2.rb index afdd9fc7638bddc309aaa00fbc0821f9c835b41c..0eebd4d2adbd1f6885b110b23f23f1d9de4104b4 100755 --- a/sgx-bwmsgsv2.rb +++ b/sgx-bwmsgsv2.rb @@ -1133,7 +1133,10 @@ class WebhookHandler < Goliath::API unless msg || text.to_s.empty? msg = Blather::Stanza::Message.new( bare_jid, - # TODO: The numbers, what do they mean? + # Strip control codes. + # This only happened, or at least caused a problem, once, + # but it seems sensible to say that we shouldn't be getting + # control codes from the PSTN. text.gsub(/[\u0000-\u0008\u000b-\u001f]/, "") ) msg.document.encoding = "utf-8"