diff options
| author | Matteo Beccati <mbeccati@php.net> | 2014-05-27 12:04:26 +0200 |
|---|---|---|
| committer | Matteo Beccati <mbeccati@php.net> | 2014-05-27 12:04:26 +0200 |
| commit | eb2bd850041a84ac40d3b025419fb9a1b88b2280 (patch) | |
| tree | 712fdcd48738af2dd0d4c4e5faa194e79fe78369 /run-tests.php | |
| parent | cc3a1af62a803120ebe478c85541482179d43cfb (diff) | |
| parent | abfd97741056cc837918891f6f6c3662837547d0 (diff) | |
| download | php-git-eb2bd850041a84ac40d3b025419fb9a1b88b2280.tar.gz | |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Escape non-printable characters in the junit XML output
Diffstat (limited to 'run-tests.php')
| -rwxr-xr-x | run-tests.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/run-tests.php b/run-tests.php index cd57747b2f..1b5bcec253 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2708,6 +2708,9 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag junit_suite_record($suite, 'execution_time', $time); $escaped_details = htmlspecialchars($details, ENT_QUOTES, 'UTF-8'); + $escaped_details = preg_replace_callback('/[\0-\x08\x0B\x0C\x0E-\x1F]/', function ($c) { + return sprintf('[[0x%02x]]', ord($c[0])); + }, $escaped_details); $escaped_message = htmlspecialchars($message, ENT_QUOTES, 'UTF-8'); $escaped_test_name = basename($file_name) . ' - ' . htmlspecialchars($test_name, ENT_QUOTES); |
