Home GnuPG

Introduce tsprintf(), for escaping terminal output
4e0febf56d83Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Introduce tsprintf(), for escaping terminal output

Summary:
Ref T8243. User-controlled strings like task and revision titles may contain terminal control codes which can make text bold and colorful when they shouldn't be at a minimum, and possibly do some worse things in some terminals.

Add tsprintf() for escaping these sorts of strings in order to show them to human viewers.

Test Plan: Added and executed unit tests.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8243

Differential Revision: https://secure.phabricator.com/D12966

Details

Provenance
epriestley <git@epriestley.com>Authored on May 24 2015, 3:37 PM
Parents
rPHUTIL48bfe08e5fac: Don't call pht() from generate_nodes.php
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUTIL4e0febf56d83: Introduce tsprintf(), for escaping terminal output (authored by epriestley <git@epriestley.com>).May 24 2015, 3:37 PM