Merge pull request #7439 from hayaksi1/fix/5153-sanitize-carriage-return

Exclude carriage returns from the login and password fields
This commit is contained in:
Benoit Marty
2026-08-18 10:05:40 +02:00
committed by GitHub
3 changed files with 34 additions and 4 deletions
@@ -299,10 +299,10 @@ private fun Content(
}
/**
* Ensure that the string does not contain any new line characters, which can happen when pasting values.
* Ensure that the string does not contain any line separator, which can happen when pasting values.
*/
private fun String.sanitize(): String {
return replace("\n", "")
return filterNot { it == '\n' || it == '\r' }
}
@PreviewsDayNight