Call escapeHtml on SQL statements when generating catalog report

A fine test, yet I'd like to confirm "manually/visually" that the fix remedies the original repro case or something very much like it.
Did this junit test case originally have the same symptoms visually -- apparent truncation of the query text at the first operator?