处理uEditor中的视频BUG
This commit is contained in:
parent
5f95149b36
commit
523c35624a
@ -2,10 +2,11 @@
|
|||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<base href="../../../../../../">
|
||||||
<title></title>
|
<title></title>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||||
<script type="text/javascript" src="../internal.js"></script>
|
<script type="text/javascript" src="assets/js/vendor/ueditor/dialogs/internal.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="video.css" />
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/ueditor/dialogs/video/video.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
@ -74,13 +75,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- jquery -->
|
<!-- jquery -->
|
||||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
|
<script type="text/javascript" src="assets/js/vendor/ueditor/third-party/jquery-1.10.2.min.js"></script>
|
||||||
|
|
||||||
<!-- webuploader -->
|
<!-- webuploader -->
|
||||||
<script type="text/javascript" src="../../third-party/webuploader/webuploader.min.js"></script>
|
<script type="text/javascript" src="assets/js/vendor/ueditor/third-party/webuploader/webuploader.min.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/ueditor/third-party/webuploader/webuploader.css">
|
||||||
|
|
||||||
<!-- video -->
|
<!-- video -->
|
||||||
<script type="text/javascript" src="video.js"></script>
|
<script type="text/javascript" src="assets/js/vendor/ueditor/dialogs/video/video.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -220,7 +220,7 @@
|
|||||||
var div = document.createElement( "div" );
|
var div = document.createElement( "div" );
|
||||||
div.setAttribute( "name", j );
|
div.setAttribute( "name", j );
|
||||||
if ( j == "none" ) div.className="focus";
|
if ( j == "none" ) div.className="focus";
|
||||||
div.style.cssText = "background:url(images/" + j + "_focus.jpg);";
|
div.style.cssText = "background:url(./assets/js/vendor/ueditor/dialogs/video/images/" + j + "_focus.jpg);";
|
||||||
div.setAttribute( "title", nameMaps[j] );
|
div.setAttribute( "title", nameMaps[j] );
|
||||||
floatContainer.appendChild( div );
|
floatContainer.appendChild( div );
|
||||||
}
|
}
|
||||||
@ -272,13 +272,16 @@
|
|||||||
|
|
||||||
conUrl = utils.unhtmlForUrl(conUrl);
|
conUrl = utils.unhtmlForUrl(conUrl);
|
||||||
|
|
||||||
$G("preview").innerHTML = '<div class="previewMsg"><span>'+lang.urlError+'</span></div>'+
|
$G("preview").innerHTML = '<video controls="" preload="none" width="420" height="280" src="'+ conUrl +'" data-setup="{}">' +
|
||||||
'<embed class="previewVideo" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"' +
|
'<source src="'+ conUrl +'" type="video/mp4"/>' +
|
||||||
' src="' + conUrl + '"' +
|
'</video>';
|
||||||
' width="' + 420 + '"' +
|
// $G("preview").innerHTML = '<div class="previewMsg"><span>'+lang.urlError+'</span></div>'+
|
||||||
' height="' + 280 + '"' +
|
// '<embed class="previewVideo" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"' +
|
||||||
' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" >' +
|
// ' src="' + conUrl + '"' +
|
||||||
'</embed>';
|
// ' width="' + 420 + '"' +
|
||||||
|
// ' height="' + 280 + '"' +
|
||||||
|
// ' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" >' +
|
||||||
|
// '</embed>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -362,14 +362,14 @@
|
|||||||
//output xss过滤
|
//output xss过滤
|
||||||
,outputXssFilter: true
|
,outputXssFilter: true
|
||||||
// xss过滤白名单 名单来源: https://raw.githubusercontent.com/leizongmin/js-xss/master/lib/default.js
|
// xss过滤白名单 名单来源: https://raw.githubusercontent.com/leizongmin/js-xss/master/lib/default.js
|
||||||
,whitList: {
|
,whiteList: {
|
||||||
a: ['target', 'href', 'title', 'class', 'style'],
|
a: ['target', 'href', 'title', 'class', 'style'],
|
||||||
abbr: ['title', 'class', 'style'],
|
abbr: ['title', 'class', 'style'],
|
||||||
address: ['class', 'style'],
|
address: ['class', 'style'],
|
||||||
area: ['shape', 'coords', 'href', 'alt'],
|
area: ['shape', 'coords', 'href', 'alt'],
|
||||||
article: [],
|
article: [],
|
||||||
aside: [],
|
aside: [],
|
||||||
audio: ['autoplay', 'controls', 'loop', 'preload', 'src', 'class', 'style'],
|
audio: ['autoplay', 'controls', 'loop', 'preload', 'src', '_src', '_url', 'class', 'style'],
|
||||||
b: ['class', 'style'],
|
b: ['class', 'style'],
|
||||||
bdi: ['dir'],
|
bdi: ['dir'],
|
||||||
bdo: ['dir'],
|
bdo: ['dir'],
|
||||||
@ -400,7 +400,7 @@
|
|||||||
header: [],
|
header: [],
|
||||||
hr: [],
|
hr: [],
|
||||||
i: ['class', 'style'],
|
i: ['class', 'style'],
|
||||||
img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', 'loadingclass', 'class', 'data-latex'],
|
img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', '_url', 'loadingclass', 'class', 'data-latex'],
|
||||||
ins: ['datetime'],
|
ins: ['datetime'],
|
||||||
li: ['class', 'style'],
|
li: ['class', 'style'],
|
||||||
mark: [],
|
mark: [],
|
||||||
@ -425,7 +425,7 @@
|
|||||||
tt: [],
|
tt: [],
|
||||||
u: [],
|
u: [],
|
||||||
ul: ['class', 'style'],
|
ul: ['class', 'style'],
|
||||||
video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style']
|
video: ['autoplay', 'controls', 'loop', 'preload', 'src', '_src', '_url', 'height', 'width', 'class', 'style']
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user