mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PM-3561] Clean the return url of any whitespace (#3696)
* clean the return url of any whitespace * ReplaceWhiteSpace helper * tests for ReplaceWhiteSpace helper --------- Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
@ -438,4 +438,15 @@ public class CoreHelpersTests
|
||||
{
|
||||
Assert.Null(CoreHelpers.GetEmailDomain(wrongEmail));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("hello world")]
|
||||
[InlineData(" hello world ")]
|
||||
[InlineData("hello\tworld")]
|
||||
[InlineData("hello\r\nworld")]
|
||||
[InlineData("hello\nworld")]
|
||||
public void ReplaceWhiteSpace_Success(string email)
|
||||
{
|
||||
Assert.Equal("helloworld", CoreHelpers.ReplaceWhiteSpace(email, string.Empty));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user