Encode text before adding to output.