more fixes to JS youtube regex
This commit is contained in:
parent
f57d48608e
commit
a3fefd9bb8
|
@ -15,7 +15,7 @@ function authorText(author) {
|
|||
return author.name;
|
||||
}
|
||||
|
||||
var commentYoutubeRegex = /(?:https?:\/\/)(?:www\.)(?:youtube\.com|youtu\.be)\/(?:watch)?(?:\?v=)?([^"&?\/ ]{11})(?:[^\s]*)/gi;
|
||||
var commentYoutubeRegex = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch)?(?:\?v=)?([^"&?\/ ]{11})(?:[^\s]*)/gi;
|
||||
|
||||
function embedYoutube(text) {
|
||||
return m.trust(lichess.escapeHtml(text).replace(commentYoutubeRegex, function(m, id) {
|
||||
|
|
Loading…
Reference in a new issue