diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-22 20:27:33 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-22 20:27:33 +0900 |
| commit | 48981196fb54aef826fe6f94c8028ed1c4b9db7a (patch) | |
| tree | e905e7dd16ad3f592bbc1ced941893e338d7370e /crates/shirabe | |
| parent | 07df794b421c0fdd6b8897eab8b7606082b88bde (diff) | |
| download | php-shirabe-48981196fb54aef826fe6f94c8028ed1c4b9db7a.tar.gz php-shirabe-48981196fb54aef826fe6f94c8028ed1c4b9db7a.tar.zst php-shirabe-48981196fb54aef826fe6f94c8028ed1c4b9db7a.zip | |
fix(auditor): keep newlines when sanitizing audit table rows
Auditor.php calls ConsoleIO::sanitize() with a single argument, so
$allowNewlines is the default true. The port passed false, stripping
newlines out of advisory titles, links and ignore reasons before they
reach the table renderer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe')
| -rw-r--r-- | crates/shirabe/src/advisory/auditor.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/src/advisory/auditor.rs b/crates/shirabe/src/advisory/auditor.rs index 5c20ec67..6da00e86 100644 --- a/crates/shirabe/src/advisory/auditor.rs +++ b/crates/shirabe/src/advisory/auditor.rs @@ -489,7 +489,7 @@ impl Auditor { .set_headers(headers.into_iter().map(|h| h.into()).collect()); table.add_row( row.iter() - .map(|cell| ConsoleIO::sanitize(cell, false).into()) + .map(|cell| ConsoleIO::sanitize(cell, true).into()) .collect::<Vec<Cell>>() .into(), ); @@ -614,9 +614,9 @@ impl Auditor { "none".to_string() }; let row: Vec<Cell> = vec![ - ConsoleIO::sanitize(&self.get_package_name_with_link(pkg.clone().into()), false) + ConsoleIO::sanitize(&self.get_package_name_with_link(pkg.clone().into()), true) .into(), - ConsoleIO::sanitize(&replacement, false).into(), + ConsoleIO::sanitize(&replacement, true).into(), ]; table.add_row(row.into()); } |
