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

#58: Fix pasting JSON parameter set which was send via MsTeams #59

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

cezarypiatek
Copy link
Owner

No description provided.

@@ -476,6 +476,8 @@ public async void PasteParametersSetup()
try
{
var actualPayload = payload.Substring(first, (last+1) - first);
//INFO: When you send JSON via MSTeams, you will get extra non-breaking spaces on the other side. Those extra white-spaces breaks deserializer
actualPayload = actualPayload.Replace(" \u00A0", " ");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be enough to do:

actualPayload = actualPayload.Replace("\u00A0", "");

Copy link
Owner Author

Choose a reason for hiding this comment

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

I thought about that, but what if the value contains intentionally non-breaking space? For me, it's a valid use case. On the other hand, non-breaking space following regular space seems to be a little weird.

Copy link
Collaborator

Choose a reason for hiding this comment

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

that's fine with me

@cezarypiatek cezarypiatek merged commit e70d11f into main Mar 24, 2023
@cezarypiatek cezarypiatek deleted the new_features branch March 24, 2023 06:30
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