diff --git a/bridges/VkBridge.php b/bridges/VkBridge.php index 0cd2fba8512c..c5a9d4cccd4f 100644 --- a/bridges/VkBridge.php +++ b/bridges/VkBridge.php @@ -448,7 +448,9 @@ private function getPhoto($a) private function getTitle($content) { - preg_match('/^["\w\ \p{L}\(\)\?#«»-]+/mu', htmlspecialchars_decode($content), $result); + $content = explode('
', $content)[0]; + $content = strip_tags($content); + preg_match('/^[:,"\w\ \p{L}\(\)\?#«»-]+/mu', htmlspecialchars_decode($content), $result); if (count($result) == 0) { return 'untitled'; }