Color and escape codes in text/gemini
Jason McBrayer jmcbray at carcosa.net
Thu Dec 12 15:18:24 GMT 2019
Sean Conner <sean at conman.org> writes:
> It was thus said that the Great Baschdel once stated:
>> In any case I'm for filtering out unwanted escape codes.
> That's what I do, only I filter out all escape codes, since I don't
> want the screen to mess up and my program get confused as to what is
> where.
It seems to me that the idea of putting ANSI escape codes
(oversimplifying here; thanks Sean for the more complete explanation)
makes a number of assumptions:
1. That all Gemini clients are running on a terminal (emulator) that
interprets ANSI escape codes (or the client provides enough terminal
emulation to interpret these escape codes).
2. That ANSI escape codes sent by Gemini pages will only interact with
your terminal in a safe way.
3. That it is desirable for untrusted content from the Internet to be
able to control your terminal.
I, honestly, don't think any of these are true.
My suggestion: that the text/gemini format not be allowed to contain
ANSI escape codes, even with a MIME type specifying an encoding that
could contain them. If you want to send control codes, it should be sent
with an appropriate MIME type. I'm not sure what that would be,
actually ? is text/plain; charset=us-ascii correct? Or does it need to
be application/something?
--
Jason McBrayer | ?Strange is the night where black stars rise,
jmcbray at carcosa.net | and strange moons circle through the skies,
| but stranger still is lost Carcosa.?
| ? Robert W. Chambers,The King in Yellow
Archive home | About this archive