Rendered metadata silently replaces newlines with spaces, line breaks neither render nor roundtrip well in single sequence revision form
bugwebsite
We accept newlines in string metadata fields. These get retained all the way through and make it into LAPIS responses - if you put in a `\r\n` windows style line ending that's what LAPIS returns.
However, that's not what we display - so what one sees on the website differs in subtle ways from what's actually the data. This can be confusing for users: you'd have to look at the API response/metadata to see those characters.
These characters get mangled when one revises through single sequence revision.
The newlines are rendered as space on website, despite `\r\n` in submission and LAPIS response:
<img width="555" height="84" alt="Image" src="https://github.com/user-attachments/assets/12f560e4-1b51-4215-99d8-8e6d4a26d069" />
but those disappear when revising:
<img width="588" height="120" alt="Image" src="https://github.com/user-attachments/assets/7c76036b-f55c-4bb8-9b0a-4566f48e9f89" />
At first the actual state retains the whitespace - even though the textfield does not show the whitespace (different behavior than sequence details). If you don't touch the field, even though you don't see them they are still there. But as soon as you change on character, the newlines disappear.
<img width="1728" height="1084" alt="Image" src="https://github.com/user-attachments/assets/3d1f3431-33ce-4cdb-a6b4-4b49b74aac08" />
This submission was created with edge case integration test #6796 it's not so easy to put those characters in there, I don't seem to manage through the web form.
3 条评论