vConsole icon indicating copy to clipboard operation
vConsole copied to clipboard

fix: escape quotemarks in Tree (and JSON copied)

Open satouriko opened this issue 1 year ago • 1 comments

BUG: when logging an object in which strings includes quotemark, for eg.

console.log({ a: 'asdfdsa"as\ndfdsf"df' })

displays & copies an invalid json: {"a": "asdfdsa"as\ndfdsf"df"}

The pull request proposes an attempt to fix that issue. It is changed to {"a": "asdfdsa\"as\ndfdsf\"df"}

Meanwhile, behavior logging a string should not be change:

console.log('asdfdsa"as\ndfdsf"df')

displays & copies

asdfdsa"as
dfdsf"df

satouriko avatar May 29 '24 11:05 satouriko

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

tencent-adm avatar May 29 '24 11:05 tencent-adm