All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Hostettler <textshell@uchuujin.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Adam Borowski <kilobyte@angband.pl>,
	Egmont Koblinger <egmont@gmail.com>
Subject: vt: Improve CSI parsing
Date: Sat, 15 Dec 2018 15:34:19 +0100	[thread overview]
Message-ID: <20181215143423.4556-1-textshell@uchuujin.de> (raw)

This patch series improves parsing of csi sequences to be more compliant
with current practice.

ECMA-64 defines the format of CSI sequences which allow more characters
than what the vt parser currently accepts. More importantly many of
these characters are used in sequences that more capable terminal
terminal implementations use.

Adjust the parsing of CSI sequences to match xterm* by ignoring all
unknown sequences of the form
   (ESC [)|CSI [\x20-\x3f]*[\x40-\x7e]

This avoids printing unwanted characters when application send valid
sequences not supported by linux either while querying the terminal for
it's identity or when applications print sequences without knowing what
terminal implementation they are connected to (e.g. when connected over
serial lines, android's adb, simple tcp connects, etc)

* and other common terminals

             reply	other threads:[~2018-12-15 14:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15 14:34 Martin Hostettler [this message]
2018-12-15 14:34 ` [PATCH 1/4] vt: refactor vc_ques to allow of other private sequences Martin Hostettler
2018-12-15 14:34 ` [PATCH 2/4] vt: Implement parsing for >, =, < " Martin Hostettler
2018-12-15 14:34 ` [PATCH 3/4] vt: ignore csi sequences with intermediate characters Martin Hostettler
2023-12-14 12:10   ` Jiri Slaby
2024-01-14 15:08     ` Martin Hostettler
2018-12-15 14:34 ` [PATCH 4/4] vt: ignore sequences that contain ':' in parameters Martin Hostettler
2019-01-18 12:59 ` vt: Improve CSI parsing Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181215143423.4556-1-textshell@uchuujin.de \
    --to=textshell@uchuujin.de \
    --cc=egmont@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kilobyte@angband.pl \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.