Homec4science

Introduce tsprintf(), for escaping terminal output

Authored by epriestley <git@epriestley.com> on May 24 2015, 15:37.

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

Committed
epriestley <git@epriestley.com>May 24 2015, 15:37
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU48bfe08e5fac: Don't call pht() from generate_nodes.php
Branches
Unknown
Tags
Unknown

Event Timeline

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