Such characters in a model's description fields are escaped properly when saving section data to XML. However, name fields are not. Imitating description escaping for name fields is a quick easy fix. But that depends entirely on continued use of fields called name and description in new models.
A more robust fix would be to add a boolean constraint called e.g. escapeText to free-text fields that require escaping. Of course, that too requires awareness of the need to include that constraint in a new model/field. But it still beats hard-coded checks of field names.