Support Vantor XML namespaces#23
Draft
klassenjs wants to merge 3 commits into
Draft
Conversation
added 2 commits
June 13, 2026 20:50
UTF-8 is invalid. Proper is utf-8.
klassenjs
commented
Jun 15, 2026
klassenjs
left a comment
Contributor
Author
There was a problem hiding this comment.
Ideally, this would use a proper XML parser, but I'm sticking with keeping it as a close port of the Matlab source for now.
But that does raise the question of if we need to also fix the Matlab code?
| for ps in xml_paramstrs_left: | ||
| if ps in line: | ||
| values[xml_paramstrs.index(ps)] = line.replace("<{}>".format(ps), '').replace("</{}>".format(ps), '') | ||
| regex = "<([^:]*:){0,1}"+ps+">(.*)</([^:]*:){0,1}"+ps+">" |
Contributor
Author
There was a problem hiding this comment.
Technically, this should validate that ps doesn't have anything funky in it that could be interpreted as part of the regex instead of just a literal. In practice, ps is controlled by trusted code so it would be unlikely for it to contain something unexpected.
And is not going to cause regex injection issues. This isn't a problem given the current call tree, but this is good defensive coding.
Contributor
Author
|
Back to draft status until this change actually runs successfully. |
Member
|
@klassenjs The Matlab version is long deprecated. No need to update it there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.