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

Escape vertical tab #31

Open
tschechniker opened this issue Feb 2, 2021 · 2 comments · May be fixed by #33
Open

Escape vertical tab #31

tschechniker opened this issue Feb 2, 2021 · 2 comments · May be fixed by #33

Comments

@tschechniker
Copy link

Hi,

just came over this issue. If you have a string including a vertical tab the json is broken. We need to escape it. Could you please extend the escaping list and add "\v" to be escaped too?

Thanks!

Tobi

@tschechniker
Copy link
Author

something like this helps:

yieldable-stringify.js

 let escape = {
    '\b': '\\b',
    '\t': '\\t',
    '\n': '\\n',
    '\f': '\\f',
    '\r': '\\r',
    '\v': '\\u000B',
    '"': '\\"',
  };

@gireeshpunathil
Copy link
Member

@tschechniker - thanks for reporting this, I will look at this.

yathamravali pushed a commit to yathamravali/yieldable-json that referenced this issue Dec 20, 2021
by adding escape sequencing for vertical tab

Add two unit tests to validate this scenario.
Fixes: ibmruntimes#31
yathamravali pushed a commit to yathamravali/yieldable-json that referenced this issue Dec 20, 2021
Both APIs fail when the key or value contain vertical tab. Fix that
by adding escape sequencing for vertical tab

Add two unit tests to validate this scenario.
Fixes: ibmruntimes#31
@yathamravali yathamravali linked a pull request Dec 20, 2021 that will close this issue
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 a pull request may close this issue.

2 participants