ff4j icon indicating copy to clipboard operation
ff4j copied to clipboard

Escape new lines in JSON returned value (here creating features)

Open zengbo0710 opened this issue 4 years ago • 4 comments

Create a Feature issue if the description has a new line in version 1.8.7

Response like below, if the description has a new line.

{"uid":"Test","enable":false,"description":"Test
Test","group":null,"permissions":[],"flippingStrategy":null,"customProperties":{}}

description example:

Test
Test

zengbo0710 avatar Sep 28 '20 01:09 zengbo0710

You are here using the REST API. I reproduce the error. Solution is to escape new lines in JSON strings.

Are you using the spring-boot-starter of the ff4j-webapi-jersey2x api implementation ?

clun avatar Oct 03 '20 13:10 clun

You are here using the REST API. I reproduce the error. Solution is to escape new lines in JSON strings.

Are you using the spring-boot-starter of the ff4j-webapi-jersey2x api implementation ?

I didn't use ff4j-webapi-jersey2x.

zengbo0710 avatar Oct 03 '20 14:10 zengbo0710

Create Feature image

Feature details gone image

zengbo0710 avatar Oct 03 '20 14:10 zengbo0710

Hi :) I add +1 to @zengbo0710 I think this error was already raised and mentionned on this ticket https://github.com/ff4j/ff4j/issues/341 with fix suggestion. Hope you can fix it because it is very unconfortable at usage. Users are seeing a multiline field so they naturally think they can add new line. If they do, the feature is not editable anymore..

Best regards

Sleepy78 avatar Mar 25 '21 09:03 Sleepy78

Issue will be fixed with 1.9 (release 20/12/2022)

Screenshot 2022-12-19 at 22 58 50 Screenshot 2022-12-19 at 22 59 00 Screenshot 2022-12-19 at 22 59 09

clun avatar Dec 19 '22 21:12 clun