From 24e95482977c03309bcb1a0c53e343c016e7f2d0 Mon Sep 17 00:00:00 2001 From: lolcat Date: Wed, 12 Jun 2024 22:41:02 -0400 Subject: i fucking hate google --- lib/fuckhtml.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/fuckhtml.php') diff --git a/lib/fuckhtml.php b/lib/fuckhtml.php index f3a6efe..8b5eba5 100644 --- a/lib/fuckhtml.php +++ b/lib/fuckhtml.php @@ -240,7 +240,17 @@ class fuckhtml{ public function getElementsByFuzzyAttributeValue(string $name, string $value, $collection = null){ $elems = $this->getElementsByAttributeName($name, $collection); - $value = explode(" ", $value); + $value = + explode( + " ", + trim( + preg_replace( + '/ +/', + " ", + $value + ) + ) + ); $return = []; -- cgit v1.2.3