pretty-print: don't use OSC 8 for incompatible URLs

This commit is contained in:
Lennart Poettering
2024-12-11 10:35:03 +01:00
parent f79562aaee
commit 0823d96a0b
3 changed files with 27 additions and 2 deletions
+6
View File
@@ -157,3 +157,9 @@ int terminal_is_pty_fd(int fd);
int pty_open_peer_racefree(int fd, int mode);
int pty_open_peer(int fd, int mode);
static inline bool osc_char_is_valid(char c) {
/* Checks whether the specified character is safe to be included inside an ANSI OSC sequence, as per
* ECMA-48 5th edition, section 8.3.89 */
return (unsigned char) c >= 32U && (unsigned char) c < 127;
}