Fixed the notes not showing when there is \n by making the string given to the javascript safe for it to understand by {{ file|escapejs}}