dfir-iris / iris-web

Collaborative Incident Response platform
GNU Lesser General Public License v3.0
1.08k stars 184 forks source link

Can't add a new line into the 'Case Description' field when adding via the API #261

Open 59split opened 1 year ago

59split commented 1 year ago

Please ensure your feature request is not already on the roadmap or associated with an issue. This can be checked here.

Is your feature request related to a problem? Please describe. I'm trying to add a carriage return into the 'Case Description' field when sending data in via the API but everything I have tried results in one long continuous line.

Describe the solution you'd like A method of sending multiple separate lines of text to the 'Case Description' field via the API

Describe alternatives you've considered I've tried \<br>, 2 spaces at the end of the line, '\' at the end of the line which is supported by CommonMark, \r\n, %0D%0A, and \ \

Additional context I've also tried adding a bulleted list, and a table but both these fail and the new line is not preserved.

whikernel commented 1 year ago

Hi @59split

Have you tried the combination " \n", with two spaces before the line break?

Cheers

59split commented 1 year ago

hi @whikernel thanks for the suggestions. I did more troubleshooting this morning and found that using \n or \r does the carriage return, and it was actually working before, however it appears that the issue is how the markdown is rendered, as if I 'edit' the markdown I can see the carriage returns but they don't show in the rendered view. However \r\r or \n\n does create a new paragraph.

In the attached screenshot I want lines 1-3 to be on separate lines but they are concatenated together on one line when rendered. iris_description_md_rendering

Is this a bug, or perhaps a feature of the flavour of markdown being used. Either way, any idea how to solve this, and should I close out this feature enhancement and create a new one (or a bug report) for the markdown rendering? Cheers.

whikernel commented 1 year ago

You can keep the issue open, I think there's an issue of filtration on the rendered. We'll take a closer look and fix if necessary.