Escaping fix for serializing Text nodes