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

Handle escape string for strings containing quotes #146

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

skhugh
Copy link
Contributor

@skhugh skhugh commented Jan 16, 2024

What this PR does / why we need it?

Removed single quotes from escaping.
Escape string for object keys.

Any background context you want to provide?

What are the relevant tickets?

yorkie-team/yorkie-js-sdk#700

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

@skhugh skhugh requested review from hackerwins and 7hong13 January 16, 2024 04:57
@skhugh skhugh self-assigned this Jan 16, 2024
Copy link
Contributor

@7hong13 7hong13 left a comment

Choose a reason for hiding this comment

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

I think it also needs to applied to the attributes keys in CrdtText.value:

""""${it.key}":"${escapeString(it.value)}""""

@skhugh
Copy link
Contributor Author

skhugh commented Jan 16, 2024

5f002c9

Thanks for the heads up.
It is done at 5f002c9. Also added test codes for it.

@skhugh
Copy link
Contributor Author

skhugh commented Jan 16, 2024

I think it also needs to applied to the attributes keys in CrdtText.value:

""""${it.key}":"${escapeString(it.value)}""""

Thanks for the heads up. It is done at 5f002c9. Also added test codes for it.

@skhugh skhugh merged commit 5989f50 into yorkie-team:main Jan 16, 2024
5 of 6 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