Skip to content

fix: handle surrogates in route fallback JSON - #3370

Closed
himanshug189-sketch wants to merge 1 commit into
microsoft:mainfrom
himanshug189-sketch:fix-route-fallback-surrogate-json
Closed

himanshug189-sketch wants to merge 1 commit into
microsoft:mainfrom
himanshug189-sketch:fix-route-fallback-surrogate-json

Conversation

@himanshug189-sketch

Copy link
Copy Markdown

Summary

  • Escape unpaired UTF-16 surrogate code points and combine valid surrogate pairs when serializing JSON, matching JavaScript JSON.stringify() behavior.
  • Add a regression test for route fallback JSON containing lone surrogates, valid surrogate pairs, and regular Unicode characters.

Testing

  • python -m pytest tests/async/python/test_network.py -v — 18 passed.
  • python -m pytest tests/async/page/test_page_request_fallback.py tests/async/page/test_page_request_continue.py -v — 158 passed, 1 expected xfail.

Fixes #3369

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

[Bug]: Route fallback/continue fails to serialize JSON containing lone surrogate characters

3 participants