Skip to content

Commit

Permalink
Extend regex
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur791004 committed Aug 28, 2024
1 parent 99838b1 commit 1e82876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/plugins/jetpack/modules/shortcodes/vimeo.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function vimeo_link( $content ) {
* Could erroneously capture:
* <a href="some.link/maybe/even/vimeo">This video (vimeo.com/12345) is teh cat's meow!</a>
*/
$plain_url = "(?:[^'\">]?\/?(?:https?:\/\/)?vimeo\.com[^0-9]+)([0-9]+)(?:[^'\"0-9<]|$)";
$plain_url = "(?:[^'\">]?\/?(?:https?:\/\/)?vimeo\.com\/(?:groups\/\d+\/videos\/|album\/\d+\/video\/|video\/|channels\/[^\/]+\/videos\/|[^\/]+\/)?([0-9]+)(?:[^'\"0-9<]|$)";

return jetpack_preg_replace_callback_outside_tags(
sprintf( '#%s|%s#i', $shortcode, $plain_url ),
Expand Down

0 comments on commit 1e82876

Please sign in to comment.