You need to be using a modern xterm-compatible terminal emulator that supports bracketed paste mode. xterm, urxvt, iTerm2, konsole, gnome-terminal (and other terminals using libvte) are known to work.