Appended the test for special characters in addition to line breaks.