Support html logs in the logger window.

Escape special characters to display them correctly in the logger window.

[Closes #4146]