Added converting to entities in HTML-output mode