In the pretty-printing module (PP.hs) there are many locations that print a value by adding double quotes around the pretty-printed text (e.g. doubleQuotes $ text $ FIELDNAME ELEM). It is likely that many of those locations should be changed to using ppStringLiteral, which will also escape special characters (double-quotes, backslashes, non-ASCII).