Skip to content

fix(obligation): stop persisting tab chars in obligation text (#3214)#3765

Open
Flamki wants to merge 1 commit intoeclipse-sw360:mainfrom
Flamki:fix/3214-obligation-tab-normalization-signed
Open

fix(obligation): stop persisting tab chars in obligation text (#3214)#3765
Flamki wants to merge 1 commit intoeclipse-sw360:mainfrom
Flamki:fix/3214-obligation-tab-normalization-signed

Conversation

@Flamki
Copy link

@Flamki Flamki commented Feb 26, 2026

Fixes: #3214

This PR focuses on the remaining reproducible part of the issue: tab characters (\t) getting persisted in obligation text.

What changed

  • Added obligation text normalization in ThriftValidate.prepareTodo(...).
  • Tabs are converted to regular spaces before persistence.
  • Added unit test coverage in ThriftValidateTest to prevent regressions.

Why this approach

  • prepareTodo(...) is used by obligation add/update flows, so this keeps behavior consistent across write paths.
  • It is a minimal, targeted fix and avoids touching unrelated obligation rendering logic.

Validation

  • Ran locally:
    • mvn -pl :datahandler -Dtest=ThriftValidateTest -Dbase.deploy.dir=. test
    • mvn -pl :datahandler -DskipTests -Dbase.deploy.dir=. compile
  • Result: both commands passed.

Notes

Signed-off-by: Flamki <9833ayush@gmail.com>
@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin: Obligations: DB stores un-necessary HTML entities and tab characters on adding certain Obligations.

2 participants