Problem summary
Katana uses XML 1.0 under the hood to describe scenes, which disallows all ASCII control characters except for \t, \n and \r. When using other control characters, such as ESC, in a parameter, the character is serialised to XML but can’t be de-serialised, leading to errors when trying to copy and paste the node or save and load the scene.
Steps to reproduce
-
Enter the following in the Python console:
n = NodegraphAPI.CreateNode('Dot', NodegraphAPI.GetRootNode())
n.getParameters().createChildString('huh', '\0330x07taco')
-
Copy and paste the resulting dot node or save and re-load the scene.
Result: The scene doesn’t load or the node isn’t pasted and the following error message is printed to the terminal:
Parser.parse: Bad XML syntax: not well-formed (invalid token), line 7
Workaround
Avoid using escape characters other than \t, \n and \r (	, and ) in node parameters.
Reproduced by support
Katana 2.5v4 Windows 7
Katana 2.5v4, 2.5v1, 2.1v5, 2.1v1, 2.0v5, 2.0v1, 1.6v3 RHEL 6
Expected behaviour
Disallowed control characters shouldn’t be accepted and serialised in parameters.
Actual behaviour
These characters are allowed and get written into the XML, but can’t be parsed