This is another reason I always type a '#' before copy/pasting any long commands. The main reason is that I sometimes want to edit a long copied command and sometimes a newline get caught in my 'copy'. The '#' prevents it from accidentally executing.
As explained above, this will help only against the first line of the attack (until the first newline character). The subsequent lines will be executed.
A better solution would be to paste the text in to an editor.