changed URI encoding behavior to also encode brackets