Make sure we encode spaces in hash fragments, but not % in URI