#768: Escape IP addresses when querying database.