This is a rlwrap bug that has been there for a long time. Since version 8.1, readline enables bracketed-paste by default, and that bug is now exposed. The simple fix, for now, is to disable bracketed-paste from within rlwrap, but since it is a useful feature I'll try to accomodate it.
Hans (rlwrap maintainer)
