Skip to content

Commit

Permalink
Allow any word char in tags, not just a-z
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Nov 16, 2019
1 parent ab6e08c commit a17ae11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VideoPlatformsParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit a17ae11

Please sign in to comment.