Update Current.php

This commit is contained in:
Visman 2023-06-20 23:31:11 +07:00
parent b9ac5230ad
commit 77466f3444

View file

@ -122,7 +122,7 @@ class Current extends Action
'spider' => ['%spider(?![\w ]*build/)%'],
'google' => ['%google(?:\w| |;|\-(?!tr))%'],
'wordpress' => ['', '%(wordpress)%i'],
'compatible' => ['%compatible(?!;\ msie)%', '%compatible[;) ]+([\w ./!-]+)%i']
'compatible' => ['%compatible(?!;\ msie)%', '%compatible[;) (]+([\w ./!-]+)%i']
];
/**
@ -179,11 +179,13 @@ class Current extends Action
'%[^\w/.-]+%',
'%(?:_| |-|\b)bot(?:_| |-|\b)%i',
'%(?<=^|\s)[^a-zA-Z\s]{1,2}(?:\s|$)%',
'%/\S*+\K.+%',
];
$rep = [
' ',
'',
'',
'',
];
$agent = \trim(\preg_replace($reg, $rep, $agent));