You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Dynamo Team will meet 1x a month to review PRs found on Github (Issues will be handled separately)
PRs will be reviewed from oldest to newest
If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or depending on its utility will be taken over by someone on the team
PRs that do not have one of the Dynamo PR templates completely filled out with all declarations satisfied will not be reviewed by the Dynamo team.
PRs made to the DynamoRevit repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after a LGTM label is added to the PR.
Purpose
DYN-1195
Dropdown nodes can fail to maintain previous selection in Dynamo Player.
This PR fixes an edge case that when parsing selection which contains special characters in XML doc like &, <, >, etc, our code failed catch the exception causing unescaping to fail silently.
For example, Revit Fill Pattern selection contains which contains invalid XML string when parsing. Internally, we escape this string to be
@mjkkirschner This is actually not part of Json deserialization, this expose a problem underneath that the undo, redo, update value commands are still using XML format. So executing these command still going through the XML code. I am not sure why we escape charters in this case, need to check with @sm6srw why he added this guard in the first place.
@mjkkirschner Yes, if we removed the XML serialization/ deserialization code and finished the refactor on time, we should not need this fix at all. But it is what it is.
Update to use native .Net functions instead of XML reader/writer for string with Xml special char escaping and unescaping. Unit tests added and passing.
@mjkkirschner With this implementation, D4R code and tests can stay as its current state. I would like to run D4R self CI though @ZiyunShang@AndyDu1985 😉
* DropdownValueXmlParsing
* Use .Net methods for escape and unescape
* Add Unit Tests
* Update to use WebUtility.HtmlDecode and add unit tests
* Address Comments
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.
Please Note:
DynamoRevit
repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after aLGTM
label is added to the PR.Purpose
DYN-1195
Dropdown nodes can fail to maintain previous selection in Dynamo Player.
This PR fixes an edge case that when parsing selection which contains special characters in XML doc like &, <, >, etc, our code failed catch the exception causing unescaping to fail silently.
For example, Revit Fill Pattern selection contains which contains invalid XML string when parsing. Internally, we escape this string to be
After unescaping, the string will went back to
Behavior after bug fixing

TODO:
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@mjkkirschner @aparajit-pratap
FYIs
@BogdanZavu @dobriai