[FIX] exception rendering with pretty printed XML

had not been migrated to lxml
[FIX] ensure all g_inner content is correctly encoded

fixes #1130

* provided `inner` data may or may not have been encoded
* `element.text` is either ascii-compatible `str` or `unicode` when
  non-ascii-compatible, which could force the decoding of utf8-encoded content
  during g_inner's join