center-for-threat-informed-defense / attack-flow

Attack Flow helps executives, SOC managers, and defenders easily understand how attackers compose ATT&CK techniques into attacks by developing a representation of attack flows, modeling attack flows for a small corpus of incidents, and creating visualization tools to display attack flows.
https://ctid.io/attack-flow
Apache License 2.0
522 stars 83 forks source link

AF-127 Text Trimming #92

Closed nikorev closed 11 months ago

nikorev commented 11 months ago

Currently trims leading and trailing whitespace via .trim(). I see there is a future ticket (AF-170) to handle single vs multi-line text fields. Should I strip all newline characters for now, or in the future will the UI prevent users from creating new lines (i.e. hitting enter) inside of single-line text fields?

Still testing to verify I hit all spots where we're looking to trim, marking as draft for now.

mikecarenzo commented 11 months ago

Should I strip all newline characters for now, or in the future will the UI prevent users from creating new lines (i.e. hitting enter) inside of single-line text fields?

No. For now, simply trim trailing and leading whitespace. In the future, users won't be able to use the enter key on fields flagged as single line.

nikorev commented 11 months ago

Was missing one trim call. Marking branch as ready:

image

image

image

image

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication