[VkBridge] Remove non ascii chars from post date to correctly parse it (#1977)

This commit is contained in:
Eugene Molotov 2021-02-10 18:11:48 +05:00 committed by GitHub
parent 9e58735b01
commit 98352845a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -379,6 +379,7 @@ class VkBridge extends BridgeAbstract
return $time;
} else {
$strdate = $post->find('span.rel_date', 0)->plaintext;
$strdate = preg_replace('/[\x00-\x1F\x7F-\xFF]/', ' ', $strdate);
$date = date_parse($strdate);
if (!$date['year']) {