id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4562	pasting long block from clipboard inserts wrong content for line breaks	newbie-02	andrew_b	"hi @ all, I'm new here, sorry for all I might do wrong, 
 
short description: pasting a long block from a web-browser inserts one special block of 'foreign content' after / instead of multiple line breaks, making result unusable. 
 
I'm aware it's a weird problem, did all I can do, persistent, thus ask for help, if not solvable already info if 'clean or bad on other systems' or hints for further track down can be helpful. 
 
After I first noticed I tried lots of things, none helped, just now installed mc from scratch, issue persists. 
 
System: actual Kali linux ( Debian ) on Intel ( Xeon ) hardware which works quite stable. 
 
Reproducibility: copy some text from a webpage, as reference I marked the main text of https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ from 'Comparing Floating Point Numbers, 2012 Edition' to 'with all of its flaws' in actual version of Brave and copied by Ctrl-C. 
 
If I paste into a text application, e.g. 'Mousepad', by Ctrl-V I get a meaningful display and can save the text. 
 
Opening an empty text file with mc ( F4 ) and pasting there with Shift-Ctrl-V the pasting takes some time, with cursor flipping around on the screen, and then I get the start of the page as wanted, but starting at some point a special block of nonsense is inserted instead of most ( all? ) linebreaks. The point where the nonsense starts varies from try to try. 
 
I'll try to attach the head of a copy from pasting into Mousepad and alternately mc. 
 
The problem is persistent, the block is always the same, and behavior didn't change with fresh installation of mc ( ver. 4.8.31 from today - git clone https://github.com/MidnightCommander/mc.git - ./autogen.sh - sudo apt install build-dep mc ( S-Lang was missing ) - ./configure - make -j12 - sudo make install -j12 ). 
 
As the unwanted block is part of another text on my system I think me or my system bad, as it's always the same I think must be configured / referenced somewhere, but couldn't find that block in all my files ( searched all files inc. configuration and hidden ) except in the origin and where I saved pasting tries with mc. 
 
Even tried to work on another disk ( home instead of data ), same problem, same block. 
 
Have been involved in two other pasting bugs, LO Calc sometimes not pasting content from other apps, was a windows 'occupied, wait and retry' problem, and GNOME Gnumeric not pasting webbrowser content, was a 'browser exports bad html' problem, IMHO none of them fits here. 
 
Trying a workaround which there often helped, paste into pure text application, copy from there and then paste into mc doesn't work here, produces same / similar wrong content. 
 
I'm clueless, can anybody give a hint? 
 
To make it a good bug report, info as requested: 
 
'search before create new ticket' - I searched 'paste' and 'wrong', 2 pages of reports, none matching my experience, 
 
LC_MESSAGES=C mc -V: 
 
GNU Midnight Commander 4.8.31
Built with GLib 2.78.4
Built with S-Lang 2.3.3 with terminfo database
Built with libssh2 1.11.0
With builtin Editor and Aspell support
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, shell
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

LC_MESSAGES=C mc -F: 
 
Home directory: /home/kali
Profile root directory: /home/kali

[System data]
    Config directory: /etc/mc/
    Data directory:   /usr/share/mc/
    File extension handlers: /usr/lib/mc/ext.d/
    VFS plugins and scripts: /usr/lib/mc/
        extfs.d:        /usr/lib/mc/extfs.d/
        shell:          /usr/lib/mc/shell/

[User data]
    Config directory: /home/kali/.config/mc/
    Data directory:   /home/kali/.local/share/mc/
        skins:          /home/kali/.local/share/mc/skins/
        extfs.d:        /home/kali/.local/share/mc/extfs.d/
        shell:          /home/kali/.local/share/mc/shell/
        mcedit macros:  /home/kali/.local/share/mc/mc.macros
        mcedit external macros: /home/kali/.local/share/mc/mcedit/macros.d/macro.*
    Cache directory:  /home/kali/.cache/mc/ 
 
mc --configure-options: 
 
 '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'AWK=awk' 'X11_WWW=x-www-browser' '--libexecdir=/usr/lib' '--with-x' '--with-screen=slang' '--disable-rpath' '--disable-static' '--disable-silent-rules' '--enable-aspell' '--enable-vfs-sftp' '--enable-vfs-undelfs' '--enable-tests' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/mc-4.8.31=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
 
search: did, see above, 
 
distribution first: did fresh compile from sources, 

steps: see head of this report, 

expected: file like attached 'mc_paste_should.txt', note that that's only the first few paragraphs! 
 
see instead: file like attached 'mc_paste_happening.txt', note that that's only the first few paragraphs! The issue strikes in long pasting only! "	defect	closed	minor	4.8.32	mcedit	master	fixed	paste wrong content				merged	committed-master
