adding URI encoding and decoding for HTRC IDs