-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When editing and saving obligations with multiple textNodes, sometimes the backend stores undesired formatting such as " (HTML entity for double quote) and \t (tab character) in CouchDB. These are visible in the saved JSON and affect display in the UI.
Discovered this while working on PR #3213 under issue #3116
How to reproduce
- Go to Admin → Obligations → Add a New Obligation like this
- Add multiple lines of obligation text , creating multiple child comments, nesting them
- Save the obligation
- View the saved CouchDB JSON entry under Obligations
Screenshots ( if applicable )
The couch db is like this
{
"_id": "33d1fd9a922b183058ad4b494700894c",
"_rev": "1-19492003b85219019168907293f74879",
"development": false,
"textNodes": [
"It is ensured that only analyzed Source Code is delivered and that the delivered binaries match to the analyzed source code.",
"It is ensured that only analyzed Source Code is delivered and that the delivered binaries match to the analyzed source code."",
"\tIt is ensured that only analyzed Source Code is delivered and that the delivered binaries match to the analyzed source code.""
],
"issetBitfield": "0",
"text": "It is ensured that only analyzed Source Code is delivered and that the delivered binaries match to the analyzed source code.\nIt is ensured that only analyzed Source Code is delivered and that the delivered binaries match to the analyzed source code."\n\tIt is ensured that only analyzed Source Code is delivered and that the delivered binaries match to the analyzed source code."",
"whitelist": [],
"obligationType": "PERMISSION",
"type": "obligation",
"distribution": false,
"title": "Analyzed source code matches the delivered binaries",
"obligationLevel": "COMPONENT_OBLIGATION"
}
You can see the HTML entity getting displayed at the last. The \n is i guess common and not an Unexpected character here.
The corresponding UI to this is like --
Versions
- Docker version OR
- Last commit id on main
SW360 logs
- With docker through
docker logs sw360
- From bare metal / vm install system under /var/log/sw360/sw360.log and /var/log/tomcat/error.log
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working