You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDS: XML entities are not decoded on load, and exported values are not escaped #817
IDSSpecifications.xmlParser is created with processEntities: false (IDSSpecifications/index.ts), so entities in an IDS file are kept as text. A specification named R&D walls loads as R&D walls, and a requirement value Smith & Sons loads as Smith & Sons, which never equals the model's Smith & Sons. Any IDS value containing &, <, > or quotes fails or is mismatched.
The export has the opposite problem: names, descriptions, instructions, the info block and facet values (exporters/parameter.ts) are written by string interpolation without escaping. Today that round-trips only because the values were never decoded. A value set in code that contains & or < produces invalid XML. For example a simple value Smith & Sons <Ltd> exports as <simpleValue>Smith & Sons <Ltd></simpleValue>, and re-loading reads <Ltd> as an element.
Turn entity processing on (fast-xml-parser 5.7.2 decodes the predefined entities and applies its expansion limits by default), and escape text and attribute values on export. A PR with a test follows.
utils/xml.ts (XML.parser) and the BCF parser also use processEntities: false. I've left those alone here.
System info
main at 8479a7c, Node 24.14.0, macOS, yarn 3.2.1 (the repo's own setup).
Activity