Skip to content

Conversation

@ctrufan
Copy link

@ctrufan ctrufan commented May 27, 2024

This PR is to address several issues with the SVG tool that can lead to output of SVGs that are noncompliant per the SVG Tiny P/S spec located at http://bimigroup.org/resources/SVG_PS-latest.rnc.txt .

  • Minor bugfix related to the use of a single ampersand instead of a double (did not impact compliance/parsing behavior, just caused tool to throw an error in certain use cases)
  • The tool looks at the "allowed element list" and then processes/removes disallowed attributes from the allowed elements. It does not remove the elements that are not in the "allowed" list.
  • Tool is using a generic list of allowed elements for an SVG Tiny P/S, so potentially allows nesting of elements that shouldn't actually contain each other.

string name = nameAndValue[0];
string value = nameAndValue[1];

if (ALLOWED_ELEMENTS_NAME.Contains(eleName) == true & ALLOWED_ATTRIBUTES[eleName].Contains(name) == false)
Copy link
Author

@ctrufan ctrufan May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the allowed elements change, previous code usage of single ampersand meant that if ALLOWED_ELEMENTS_NAME.Contains was false, the latter half would still attempt to resolve and throw an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant