Skip to content

Escape ANSI escape sequences when displaying user-generated content #932

@mislav

Description

@mislav

The output of gh issue view 930 looks really garbled around the middle because the body of that issue includes some terminal escape codes which are then literally interpeted by the terminal when we render that text.

As another example, I have embedded the escape code for an audible bell in this text, which you should be able to hear if you issue view this issue. �

Whenever we show user-generated content (such as issue/PR titles, bodies, comments, etc.) we should try to escape all terminal escape sequences to ensure they never take effect in the viewing terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions