lensesio/schema-registry-ui

Special Characters In Schema Are Not Escaped

Dragsaw opened this issue · 0 comments

When saving a schema with a escaped characters in a field value (e.g. \n, \t, \") the server validation fails with 500 error.

Example schema (note \n at the beginning of "doc" field):
{ "type": "record", "name": "evolution", "doc": "\nThis is a sample Avro schema to get you started. Please edit", "namespace": "com.landoop", "fields": [ { "name": "name", "type": "string" } ] }

The error happens because these characters are not escaped in the HTTP request:
image
The request should contain \\n instead of \n.