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