Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYN-6569 Extended Characters Md2HTML Fix #15377

Conversation

RobertGlobant20
Copy link
Contributor

Purpose

Fixing problem when displaying extended characters in DocumentationBrowser
When sending extended characters to the Md2HTML tool (using stdin and stdout) was replacing the characters by other weird symbols then for fixing this problem I'm encoding the info to base64 when sending and decoding the info when getting the html (from Md2HTML).

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Fixing problem when displaying extended characters in DocumentationBrowser

Reviewers

@QilongTang

FYIs

@mjkkirschner

When sending extended characters to the Md2HTML tool (using stdin and stdout) was replacing the characters by other weird symbols then for fixing this problem I'm encoding the info to base64 when sending and decoding the info when getting the html (from Md2HTML).
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-6569

@RobertGlobant20
Copy link
Contributor Author

SweepAsSurface - Czech
tR1Rz728pm

@RobertGlobant20
Copy link
Contributor Author

ImportExcel- Czech
FtiYHc9C0Y

@RobertGlobant20
Copy link
Contributor Author

SweepAsSurface - 한국인
RyPw2gelC9

@RobertGlobant20
Copy link
Contributor Author

ImportExcel - 한국인
wj2rkuJa5D

@QilongTang QilongTang added this to the 3.3 milestone Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

UI Smoke Tests

Test: success. 11 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests - net8.0

Moved methods DecodeHTMLContent and DecodeBase64 to the Md2HTML class (I had to convert the methods to be static).
Added comments in the EncodeBase64 method.
In the DecodeBase64 method the Catch section was updated
Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

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

LGTM pending a comment and a potential test case

I've added a unit test that validates that the extended characters are processed correctly by the Md2Html.exe tool.
Also I've modified some methods in the Md2Html.cs file to be static
When running the test it was trying to read the files from a specific language location but that location doesn't exist when running the job so I copied the md file to a different location and modified the test to use this new location.
After debugging more and inserting logs inside the Md2Html.exe tool I notice that at the beginning when chosing the UTF-8 Encoding we were sending some weird characters so instead of using == now I'm using .Equals().
So I deleted the previous code for encoding and decoding the content and set to create the process with UTF-8.
@RobertGlobant20
Copy link
Contributor Author

Removing unnecessary usings.
Fixing test for parsing the html content with regular expressions
@QilongTang QilongTang merged commit 424c87e into DynamoDS:master Jul 11, 2024
25 checks passed
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.

2 participants