Set element contents in a way that they get encoded.