From 384b81c86d371e7247f2b7e7a5f3b6f5a5f1c919 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 24 Jul 2026 20:22:51 +0900 Subject: fix(php-shim): keep literal '>' outside tags in strip_tags The b'>' match arm in strip_tags's state machine never pushed the character to the output buffer when encountered outside a tag (state 0), unlike every other special-character arm (!, ?, -, and the catch-all) which does push in that state. Every literal '>' not part of an HTML-like tag was silently dropped. This corrupted "=>" into "=" in Composer's operation trace strings (e.g. "Upgrading foo/bar (1.0.0 => 1.1.0)"), which go through strip_tags to remove the / markup before comparison, un-ignoring 82 integration tests that were asserting on that exact arrow. --- crates/shirabe-php-shim/src/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe-php-shim') diff --git a/crates/shirabe-php-shim/src/string.rs b/crates/shirabe-php-shim/src/string.rs index 2617399f..ba45bc8b 100644 --- a/crates/shirabe-php-shim/src/string.rs +++ b/crates/shirabe-php-shim/src/string.rs @@ -1183,7 +1183,7 @@ pub fn strip_tags(_str: &str) -> String { state = 0; } } - _ => {} + _ => out.push(c), } } } -- cgit v1.3.1