add test for html escaping; fix special characters eaten from output