Currently, DSpace prevents users from inserting line breaks within textareas by pressing the ENTER key .
This is due to https://github.com/DSpace/DSpace/blob/9c16711dbef079e9eee55b660997b52adf487354/dspace-jspui/src/main/webapp/utils.js#L143, which disables the ENTER key in forms in general.
But this simple method to prevent "accidentally submitting a form", hinders the user to write a well structured description or abstract when submitting a publication. Indeed, the user can copy and paste an abstract in the corresponding form field, but when it comes to manual adjustments, there is no convenient way to structure the text with 'headings' and paragraphs.
Furthermore, when reviewing the submission in the "Verify" step, even previously structured text is displayed as continuous text without any structure. The same display error occurs when viewing a publication. The issue here is, that DSpace escapes the input to prevent XSS, but the HTML encoded line feed (
) is not rendered as new line in the front end.
The solution might be quite simple. DSpace must only disable the ENTER key in input fields other than textareas, since the default event will insert a line break in textareas and never submit the form by accident.
To enable suitable rendering of running text in the "Verify" step and in a publication's details view, replacing the encoded line feed with it's HTML equivalent (<br/>) solves the problem.
I've already created a pull request on Github (https://github.com/DSpace/DSpace/pull/2289), which addresses the mentioned problem.