lensesio / schema-registry-ui

Web tool for Avro Schema Registry |
http://lenses.io/product/features
421 stars 112 forks source link

Special Characters In Schema Are Not Escaped #74

Open Dragsaw opened 6 years ago

Dragsaw commented 6 years ago

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.