Moved SQL-escaping from handle_packet/3.