ensuring url decode / encode as necessary