API: fix escaping in zone ids

Realized that we should have been taking the character code as hex,
so it actually fits into two digits.
Merge pull request #1335 from zeha/api-fix-zone-ids

API: fix escaping in zone ids