function GithubActionError::escapeData
1 call to GithubActionError::escapeData()
- GithubActionError::emit in vendor/
composer/ composer/ src/ Composer/ Console/ GithubActionError.php
File
-
vendor/
composer/ composer/ src/ Composer/ Console/ GithubActionError.php, line 47
Class
Namespace
Composer\ConsoleCode
private function escapeData(string $data) : string {
// see https://github.com/actions/toolkit/blob/4f7fb6513a355689f69f0849edeb369a4dc81729/packages/core/src/command.ts#L80-L85
$data = str_replace("%", '%25', $data);
$data = str_replace("\r", '%0D', $data);
$data = str_replace("\n", '%0A', $data);
return $data;
}