Non-breaking space broke not the line but the app
Putting am-per-sand-n-b-s-p-semicolon into a staff text from qml code caused it to write a .mscx which it could not read ("Invalid xml"). Whatever bogon I was trying to accomplish is irrelevant....It complained about the line that had the nbsp on it (I changed the ampersand to percent in this report):
<voice> <StaffText> <placement>below</placement> <minDistance>-1.0925</minDistance> <offset x="0" y="6"/> <text>850%nbsp;</text> </StaffText>
Comments
The named entities are DTD-specific. nbsp for example is defined within the (X)HTML definition.
When you use the raw (numeric) entity   (dec) or   (hex) do work.
See https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_ref… for a listing of entities with their numeric reference.
That being said, MuseScore shouldn't fail on opening such a file imo and be more graceful in handling it. Therefor created #292993: Using unknown XML-entities results in fail to open file