             return
         }
 
-        nicoManager.comment(comment, anonymously: commentAnonymouslyButton.isOn) { comment in
+        let cleaned = comment.stringByRemovingControlCharacters
+        nicoManager.comment(cleaned, anonymously: commentAnonymouslyButton.isOn) { comment in
             if comment == nil {
                 self.logSystemMessageToTable(L10n.failedToComment)
             }

            commentHistory.append(comment)
            commentHistoryIndex = commentHistory.count
        }
    }

    @IBAction func speakButtonStateChanged(_ sender: Any) {

private extension NSButton {
    var isOn: Bool { self.state == .on }
}

private extension String {
    var hasControlCharacters: Bool {
        hasRegexp(pattern: "\\p{Cntrl}")
    }

    var stringByRemovingControlCharacters: String {
        stringByReplacingRegexp(pattern: "\\p{Cntrl}", with: "")
    }
}
// swiftlint:enable file_length
