Skip to content

Interop: XML read does not error on unescaped characters #2648

@kwokcb

Description

@kwokcb

Issue

MaterialX's usage of PugiXML allows invalid XML to not be caught on read.

  1. There is an option to disallow unescaped characters.
  2. For MaterialX parser this appears to be off by default. Thus allowing characters like &.
  3. When turned off it will read unescaped characters but on write will escape them. i.e. it does not preserve breaking XML.
  4. MaterialX has a modified version of PugiXML which also allowed < explicitly to support UDIM syntax. This will always break XML validation even on write.

Proposed Implementation Changes

Suggested Implementation change:

  1. Add the escape option in. Leave it off by default to preserve current behaviour.
  2. Turn on by default for next desired release for read. Write is not affected since it always escapes.

Proposed Test Changes

Suggested process sanity check change:

  1. Run all files through read / write per release.
  2. Run check for all new / modified files.

Note that this does not affect UDIM logic which allows "<" and ">" when it's not a UDIM string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions