studio icon indicating copy to clipboard operation
studio copied to clipboard

studio's json editor do not sanitize html tag

Open Sczlog opened this issue 3 years ago • 0 comments

Bug description

An html tag appear when I store some string like in json editor image And I can't save it after edit it. even I just change the first index from 0 to 1. image string editor seems like do not have the same problem image

How to reproduce

Just store some html string into json and save it to database.

Expected behavior

show the current string but not html element.

Prisma information

model Result {
  id          String       @id @default(cuid())
  detail      Json
}

Environment & setup

  • OS: Windows 10
  • Database: PostgreSQL
  • Node.js version: 12.20.1
  • Prisma version: 2.14.0
@prisma/cli          : 2.14.0
@prisma/client       : 2.14.0
Current platform     : windows
Query Engine         : query-engine 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ..\..\node_modules\@prisma\engines\query-engine-windows.exe)
Migration Engine     : migration-engine-cli 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ..\..\node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ..\..\node_modules\@prisma\engines\introspection-engine-windows.exe)
Format Binary        : prisma-fmt 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ..\..\node_modules\@prisma\engines\prisma-fmt-windows.exe)
Studio               : 0.332.0

Sczlog avatar May 13 '21 03:05 Sczlog