Fix [#173] by encoding # in uri and unescaping