Javascript Detect Line Break In String