encode/decode uri when setting/getting hash