summaryrefslogtreecommitdiff
path: root/lib/fuckhtml.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2024-06-12 22:41:02 -0400
committerlolcat <will@lolcat.ca>2024-06-12 22:41:02 -0400
commit24e95482977c03309bcb1a0c53e343c016e7f2d0 (patch)
tree66d841d4595708ec862c98459780238e3dc5e763 /lib/fuckhtml.php
parentb492ef2329ef918b0b40f3090b4bdc3681e3fd09 (diff)
i fucking hate google
Diffstat (limited to 'lib/fuckhtml.php')
-rw-r--r--lib/fuckhtml.php12
1 files changed, 11 insertions, 1 deletions
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 = [];