Browse Source

Escape angle brackets for commit message output

xelan 9 năm trước cách đây
mục cha
commit
32517d90d2
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      src/Composer/Downloader/VcsDownloader.php

+ 3 - 0
src/Composer/Downloader/VcsDownloader.php

@@ -145,6 +145,9 @@ abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterfa
                     return '      ' . $line;
                 }, explode("\n", $logs)));
 
+                // escape angle brackets for proper output in the console
+                $logs = str_replace('<', '\<', $logs);
+
                 $this->io->writeError('    '.$message);
                 $this->io->writeError($logs);
             }