
On Sun, 26 Jun 2022 10:19:43 +1200, Eric Light wrote:
Bracketed-paste mode baffled me for a little while when I first experienced it. I think it was implemented in response to the discovery of Nasty Copy (I couldn't find a name for the shenanigan so I made this one up).
I don’t understand the point of the escape sequences, though. The terminal emulator is putting them in, to feed to itself so it can interpret them? It already knows it is the one doing the paste. Just for fun, I tried creating text lines containing CTRL/C or that “«esc»[201~” sequence, and when I try to paste them, Konsole warns me there are funnies present, and asks if I want to strip them before pasting.
Via JavaScript: https://www.wizer-training.com/blog/copy-paste
There was a certain website I used to frequent some years ago, which added this “feature”. I copied a few lines from an article, went to paste them, and found it had included a little promo for the website as well. This was probably the trigger for my part in the discussion linked below.
Or via div tags: https://docs.microsoft.com/en-us/troubleshoot/developer/browsers/core-featur...
Actually nothing specific to <div> tags there. It’s a general CSS feature, that can be applied to other tags, e.g. <span>.
... I'm sure this was discovered a few years back.