From a17ae1107eec299fb0f748ad79d3c66963f57850 Mon Sep 17 00:00:00 2001 From: "lukchojnicki@gmail.com" Date: Sat, 16 Nov 2019 01:27:55 +0100 Subject: [PATCH] Allow any word char in tags, not just a-z --- src/VideoPlatformsParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VideoPlatformsParser.php b/src/VideoPlatformsParser.php index bedf400..74b2686 100644 --- a/src/VideoPlatformsParser.php +++ b/src/VideoPlatformsParser.php @@ -71,7 +71,7 @@ public function get($url) /* If there is not tags then generate own */ if (empty($info['tags']) && !empty($info['title'])) { $info['tags'] = explode(' ', $info['title']); - $info['tags'] = preg_replace('/[^a-zA-Z0-9 ]+/', '', $info['tags']); + $info['tags'] = preg_replace('/([^\w ]|_)/u', '', $info['tags']); $info['tags'] = array_map('trim', $info['tags']); $info['tags'] = array_filter($info['tags'], function($v) { return (strlen($v) > 2) && (strlen($v) < 15); }); $info['tags'] = array_unique($info['tags']);