Escape linefeeds and carriage returns in commands and show them as html

fixes #6088