fix: Use more strict vimeo id regex

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-08-26 12:41:56 +02:00
parent 9996df1abd
commit 8245a519e0
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ import markdownItRegex from 'markdown-it-regex'
const protocolRegex = /(?:http(?:s)?:\/\/)?/
const domainRegex = /(?:player\.)?(?:vimeo\.com\/)(?:(?:channels|album|ondemand|groups)\/\w+\/)?(?:video\/)?/
const idRegex = /([\d]{6,11})/
const idRegex = /(\d{6,11})/
const tailRegex = /(?:[?#].*)?/
const vimeoVideoUrlRegex = new RegExp(
`(?:${protocolRegex.source}${domainRegex.source}${idRegex.source}${tailRegex.source})`