Fix formatting before returning HTML (blank lines)