Fix Regex for claimUrl embed url params
This commit is contained in:
parent
e9a003328d
commit
e1b6c5149a
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ async function getOEmbed(ctx) {
|
|||
|
||||
const decodedQueryUri = decodeURIComponent(urlQuery);
|
||||
const hasUrlParams = RegExp(/[?&]\w=/).test(decodedQueryUri);
|
||||
const claimUrl = hasUrlParams ? decodedQueryUri.substring(0, decodedQueryUri.search(/[?&]\w=/)) : decodedQueryUri;
|
||||
const claimUrl = hasUrlParams ? decodedQueryUri.substring(0, decodedQueryUri.search(/[?&](?:\w=)?/)) : decodedQueryUri;
|
||||
|
||||
const { claim, error } = await getClaim(claimUrl);
|
||||
|
||||
|
|
Loading…
Reference in a new issue