Skip to content

Commit

Permalink
Restore regex with defined media files with extended list
Browse files Browse the repository at this point in the history
  • Loading branch information
brookewp committed Oct 3, 2023
1 parent 1929a13 commit 260a2ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/url/src/filter-url-for-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export function filterURLForDisplay( url, maxLength = null ) {
filteredURL = filteredURL.replace( '/', '' );
}

const mediaRegexp = /\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;

const mediaRegexp =
/([\w|:])*\.(?:jpg|jpeg|gif|png|svg|ico|webp|mp3|m4a|ogg|wav|mp4|m4v|mov|wmv|avi|mpg|ogv|3gp|3g2)/;
if (
! maxLength ||
filteredURL.length <= maxLength ||
Expand Down

0 comments on commit 260a2ca

Please sign in to comment.