Fix encoding of contact ID in Ajax requests