Fix variable to remove newline characters
Update the test with the fix of newline => space