Given that control characters are usually not rendered, but they are given a special meaning in most terminals, what reasons are there for terminal apps to continue to support copy-pasting of control characters?
One can mask a harmful code as described here for example, so that it causes issues when pasted into a terminal.
The issue that causes this is twofold:
- Chrome doesn't render the ^H character, making one expect that the copied text is something different.
- gnome-terminal (or xterm) dutifully accepts it from the user as if it was direct keyboard input, executing the control characters
Why does the terminal do this? Are there any use cases for being able to paste control characters (other than \t,\r,\n) into a terminal?