Fix unicode handling in 'View HTML code as formated text'. Fixes #667