Change URL escaping

See lobid/lodmill#504

* add test
* format code