mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 12:34:45 -04:00
fix: Use more strict youtube id regex
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
95228c5d19
commit
56744db3a2
4 changed files with 24 additions and 4 deletions
|
@ -9,7 +9,7 @@ import { YoutubeMarkdownExtension } from './youtube-markdown-extension'
|
|||
import markdownItRegex from 'markdown-it-regex'
|
||||
import type MarkdownIt from 'markdown-it'
|
||||
|
||||
export const legacyYouTubeRegex = /^{%youtube ([^"&?\\/\s]{11}) ?%}$/
|
||||
export const legacyYouTubeRegex = /^{%youtube\s+([\w-]{11})\s*%}$/
|
||||
|
||||
/**
|
||||
* Configure the given {@link MarkdownIt} to render legacy hedgedoc 1 youtube short codes as embeddings.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue