Remove use of $wpdb->escape().

Closes gh-302