aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-24 20:22:51 +0900
committernsfisis <nsfisis@gmail.com>2026-07-24 20:22:51 +0900
commit384b81c86d371e7247f2b7e7a5f3b6f5a5f1c919 (patch)
treec921094c796ff5a5e6540936341671ffd6df2c3a /crates/shirabe-php-shim/src
parentdacc1cb0d7d1397701166571d74580a706c2ce73 (diff)
downloadphp-shirabe-384b81c86d371e7247f2b7e7a5f3b6f5a5f1c919.tar.gz
php-shirabe-384b81c86d371e7247f2b7e7a5f3b6f5a5f1c919.tar.zst
php-shirabe-384b81c86d371e7247f2b7e7a5f3b6f5a5f1c919.zip
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 <info>/<comment> markup before comparison, un-ignoring 82 integration tests that were asserting on that exact arrow.
Diffstat (limited to 'crates/shirabe-php-shim/src')
-rw-r--r--crates/shirabe-php-shim/src/string.rs2
1 files changed, 1 insertions, 1 deletions
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),
}
}
}