mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 09:18:08 +02:00
When pasting in bracketed paste mode and the cursor is at a shell prompt, strip out C0 control codes
Some shells incorrectly interpret these allowing escape from bracketed paste mode. Thanks to David Leadbetter for discovering.
This commit is contained in:
@@ -590,6 +590,7 @@ class TestDataTypes(BaseTest):
|
||||
self.assertNotIn(b'\x1b[201~', q)
|
||||
self.assertNotIn('\x9b201~'.encode('utf-8'), q)
|
||||
self.assertIn(b'ab', q)
|
||||
self.assertNotIn(b'\x03', sanitize_for_bracketed_paste(b'hi\x03world', True))
|
||||
|
||||
def test_expand_ansi_c_escapes(self):
|
||||
for src, expected in {
|
||||
|
||||
Reference in New Issue
Block a user