Some hopefully not shooting-self-in-the-foot code.

Bug found where chat with backslashes would allow SQL Injections to occur.
Some escaping of the chat was done to prevent this.
This is necessary because the string object is created and passed to
the actual method that calls the query which uses a PreparedStatement.