- iris kit details: 'any — issue is in the Python code generator'
- operating system: 'any'
- python version: 'any'
- error message: 'IRIS compilation error on the generated production class due to invalid XML'
Steps to Reproduce:
- Define a ServiceItem/ProcessItem/OperationItem with a setting value containing
&, <, >, or "
- Run the code generator
Minimal Example
from intersystems_pyprod import Production, ServiceItem
class MyProduction(Production):
services = [
ServiceItem(
"MyService",
"EnsLib.File.PassthroughService",
adapter_settings={
"FilePath": "/data/input&output",
},
)
]
Expected Behaviour
The value is XML-escaped (&) in the generated <Setting> element.
Actual Behaviour
Raw & is interpolated, producing invalid XML that fails to compile on IRIS side.
Additional Information
Root cause: _production_definition.py:_create_item_target_settings uses f-string
interpolation with no escaping. Same applies to item attributes (name, comment, schedule)
in _create_production_item.
Related to #6 (same category of unescaped interpolation into generated code).
Steps to Reproduce:
&,<,>, or"Minimal Example
Expected Behaviour
The value is XML-escaped (
&) in the generated<Setting>element.Actual Behaviour
Raw
&is interpolated, producing invalid XML that fails to compile on IRIS side.Additional Information
Root cause:
_production_definition.py:_create_item_target_settingsuses f-stringinterpolation with no escaping. Same applies to item attributes (name, comment, schedule)
in
_create_production_item.Related to #6 (same category of unescaped interpolation into generated code).