encode uri components

prevents weirdness with id names being urls, needs tests