mirror of
https://github.com/fluxerapp/fluxer.git
synced 2026-09-03 05:10:25 +03:00
fix(app): accept tenor links with a regional locale prefix (#1966)
This commit is contained in:
@@ -20,7 +20,7 @@ export function extractTenorSlugId(url: string): string | null {
|
||||
if (hostname !== 'tenor.com' && hostname !== 'www.tenor.com') {
|
||||
return null;
|
||||
}
|
||||
const match = parsedUrl.pathname.match(/^\/(?:[a-z]{2}\/)?view\/([^/]+)/i);
|
||||
const match = parsedUrl.pathname.match(/^\/(?:[a-z]{2}(?:-[a-z]{2})?\/)?view\/([^/]+)/i);
|
||||
if (!match?.[1]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user