Gallery: encode paths in urls