#595: fix for saving html in source mode.