properly format gateway links