This repository has no description

input: paste encoding replaces unsafe control characters with spaces master

For a hardcoded set of control characters, replace them with spaces when encoding pasted text. This is to prevent unsafe control characters from being pasted which could trick a user into executing commands unexpectedly. This happens regardless of bracketed paste mode, because certain characters processed by the kernel pty line discipline can break bracketed paste (source from zsh: https://zsh-workers.zsh.narkive.com/Kd3evJ7t/bracketed-paste-mode-in-xterm-and-urxvt). This behavior is based on xterm's behavior, including the list of characters. Note that as a comment in the code says, we should be sourcing some of these from a tcgetattr call instead of hardcoding them, but this is a good start.


Author Mitchell Hashimoto Date Commit 37e902d9 Parent e94c9059 Change ID qnpzsvxl
+85
2 changed files