From 32c722b849e515ab9d4c18f3acf6f2ecb049a869 Mon Sep 17 00:00:00 2001
From: jonny <475634114@qq.com>
Date: Sun, 27 Sep 2020 21:56:48 +0800
Subject: [PATCH] Update support video and audio whitelist (#27)
Update support video and audio whitelist
---
static/editor.md/editormd.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/static/editor.md/editormd.js b/static/editor.md/editormd.js
index 69ae2b3..30a1472 100644
--- a/static/editor.md/editormd.js
+++ b/static/editor.md/editormd.js
@@ -3491,11 +3491,23 @@
case '=video':
if(href.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)){
return ""
+ }else{
+ for(var i = 0; i< iframe_whitelist.length; i++){
+ if(href.match(iframe_whitelist[i])){
+ return ""
+ }
+ }
}
break;
case '=audio':
if(href.match(/^.+.(mp3|wav|flac|m4a)$/)){
return ""
+ }else{
+ for(var i = 0; i< iframe_whitelist.length; i++){
+ if(href.match(iframe_whitelist[i])){
+ return ""
+ }
+ }
}
break;
case '=video_iframe':