mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 08:37:55 +02:00
TinyMCE: update to 4.1.4. Changelog: http://www.tinymce.com/develop/changelog/?type=tinymce. Fixes #29310
Built from https://develop.svn.wordpress.org/trunk@29570 git-svn-id: http://core.svn.wordpress.org/trunk@29344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0eed9373e2
commit
c3c20549c5
@ -144,7 +144,7 @@ tinymce.PluginManager.add('media', function(editor, url) {
|
||||
};
|
||||
|
||||
function updateValueOnChange() {
|
||||
data = htmlToData( this.value() );
|
||||
data = htmlToData(this.value());
|
||||
this.parent().parent().fromJSON(data);
|
||||
}
|
||||
|
||||
@ -381,6 +381,56 @@ tinymce.PluginManager.add('media', function(editor, url) {
|
||||
return {};
|
||||
}
|
||||
|
||||
function sanitize(html) {
|
||||
if (editor.settings.media_filter_html === false) {
|
||||
return html;
|
||||
}
|
||||
|
||||
var writer = new tinymce.html.Writer();
|
||||
|
||||
new tinymce.html.SaxParser({
|
||||
validate: false,
|
||||
allow_conditional_comments: false,
|
||||
special: 'script,noscript',
|
||||
|
||||
comment: function(text) {
|
||||
writer.comment(text);
|
||||
},
|
||||
|
||||
cdata: function(text) {
|
||||
writer.cdata(text);
|
||||
},
|
||||
|
||||
text: function(text, raw) {
|
||||
writer.text(text, raw);
|
||||
},
|
||||
|
||||
start: function(name, attrs, empty) {
|
||||
if (name == 'script' || name == 'noscript') {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < attrs.length; i++) {
|
||||
if (attrs[i].name.indexOf('on') === 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
writer.start(name, attrs, empty);
|
||||
},
|
||||
|
||||
end: function(name) {
|
||||
if (name == 'script' || name == 'noscript') {
|
||||
return;
|
||||
}
|
||||
|
||||
writer.end(name);
|
||||
}
|
||||
}, new tinymce.html.Schema({})).parse(html);
|
||||
|
||||
return writer.getContent();
|
||||
}
|
||||
|
||||
function updateHtml(html, data, updateAll) {
|
||||
var writer = new tinymce.html.Writer();
|
||||
var sourceCount = 0, hasImage;
|
||||
@ -674,7 +724,7 @@ tinymce.PluginManager.add('media', function(editor, url) {
|
||||
if (innerHtml) {
|
||||
innerNode = new tinymce.html.Node('#text', 3);
|
||||
innerNode.raw = true;
|
||||
innerNode.value = unescape(innerHtml);
|
||||
innerNode.value = sanitize(unescape(innerHtml));
|
||||
realElm.append(innerNode);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -620,8 +620,12 @@ define("tinymce/pasteplugin/Clipboard", [
|
||||
});
|
||||
|
||||
editor.on('paste', function(e) {
|
||||
// Getting content from the Clipboard can take some time
|
||||
var clipboardTimer = new Date().getTime();
|
||||
var clipboardContent = getClipboardContent(e);
|
||||
var isKeyBoardPaste = new Date().getTime() - keyboardPasteTimeStamp < 1000;
|
||||
var clipboardDelay = new Date().getTime() - clipboardTimer;
|
||||
|
||||
var isKeyBoardPaste = (new Date().getTime() - keyboardPasteTimeStamp - clipboardDelay) < 1000;
|
||||
var plainTextMode = self.pasteFormat == "text" || keyboardPastePlainTextState;
|
||||
|
||||
keyboardPastePlainTextState = false;
|
||||
|
File diff suppressed because one or more lines are too long
18
wp-includes/js/tinymce/tinymce.min.js
vendored
18
wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -18,7 +18,7 @@ $wp_db_version = 29188;
|
||||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '4103-20140809';
|
||||
$tinymce_version = '4104-20140821';
|
||||
|
||||
/**
|
||||
* Holds the required PHP version
|
||||
|
Loading…
Reference in New Issue
Block a user