diff --git a/changelog.txt b/changelog.txt
index d36b2ef1..894bdd47 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,44 @@
+Version 4.9.11 (2020-07-13)
+ Fixed the `selection.setContent()` API not running parser filters #TINY-4002
+ Fixed content in an iframe element parsing as DOM elements instead of text content #TINY-5943
+ Fixed up and down keyboard navigation not working for inline `contenteditable="false"` elements #TINY-6226
+Version 4.9.10 (2020-04-23)
+ Fixed an issue where the editor selection could end up inside a short ended element (eg br) #TINY-3999
+ Fixed a security issue related to CDATA sanitization during parsing #TINY-4669
+ Fixed `media` embed content not processing safely in some cases #TINY-4857
+Version 4.9.9 (2020-03-25)
+ Fixed the table selection not functioning correctly in Microsoft Edge 44 or higher #TINY-3862
+ Fixed the table resize handles not functioning correctly in Microsoft Edge 44 or higher #TINY-4160
+ Fixed the `forced_root_block_attrs` setting not applying attributes to new blocks consistently #TINY-4564
+ Fixed the editor failing to initialize if a script tag was used inside an SVG #TINY-4087
+Version 4.9.8 (2020-01-28)
+ Fixed the `mobile` theme failing to load due to a bundling issue #TINY-4613
+ Fixed security issue related to parsing HTML comments and CDATA #TINY-4544
+Version 4.9.7 (2019-12-19)
+ Fixed the `visualchars` plugin converting HTML-like text to DOM elements in certain cases #TINY-4507
+ Fixed an issue with the `paste` plugin not sanitizing content in some cases #TINY-4510
+ Fixed HTML comments incorrectly being parsed in certain cases #TINY-4511
+Version 4.9.6 (2019-09-02)
+ Fixed image browse button sometimes displaying the browse window twice #TINY-3959
+Version 4.9.5 (2019-07-02)
+ Changed annotations navigation to work the same as inline boundaries #TINY-3396
+ Fixed the print plugin printing from the wrong window in IE11 #TINY-3762
+ Fixed an exception being thrown when a file or number input has focus during initialization. Patch contributed by t00 #GH-2194
+ Fixed positioning of the styleselect menu in iOS while using the mobile theme #TINY-3505
+ Fixed native context menu not showing with images in IE11 #TINY-3392
+ Fixed selection incorrectly changing when programmatically setting selection on contenteditable false elements #TINY-3766
+ Fixed image browse button not working on touch devices #TINY-3751
+ Fixed so that nbsp entities aren't trimmed in white-space: pre-line elements #TINY-3642
+ Fixed space key properly inserts a nbsp before/after block elements #TINY-3745
+ Fixed infinite loop in the paste plugin when IE11 takes a long time to process paste events. Patch contributed by lRawd. #GH-4987
+Version 4.9.4 (2019-03-20)
+ Fixed an issue where **Home/End** keys wouldn't move the caret correctly before or after `contenteditable=false` inline elements #TINY-2995
+ Fixed an issue where content may have been lost when using permanent bookmarks #TINY-3400
+ Fixed the mobile editor to clean up properly when removed #TINY-3445
+ Fixed an issue where retrieving the selected content as text didn't create newlines #TINY-3197
+ Fixed an issue where typing space between images would cause issues with nbsp not being inserted. #TINY-3346
Version 4.9.3 (2019-01-31)
- Added a visualchars_defaul_state setting to the Visualchars Plugin. Patch contributed by mat3e.
+ Added a visualchars_default_state setting to the Visualchars Plugin. Patch contributed by mat3e.
Fixed a bug where scrolling on a page with more than one editor would cause a ResizeWindow event to fire. #TINY-3247
Fixed a bug where if a plugin threw an error during initialisation the whole editor would fail to load. #TINY-3243
Fixed a bug where getContent would include bogus elements when valid_elements setting was set up in a specific way. #TINY-3213
diff --git a/composer.json b/composer.json
index 4fd60e23..32e58f5b 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "tinymce/tinymce",
- "version": "4.9.3",
+ "version": "4.9.11",
"description": "Web based JavaScript HTML WYSIWYG editor control.",
"license": [
"LGPL-2.1-only"
diff --git a/package.json b/package.json
index e2608bda..3143965f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tinymce",
- "version": "4.9.3",
+ "version": "4.9.11",
"repository": {
"type": "git",
"url": "https://github.com/tinymce/tinymce-dist.git"
diff --git a/plugins/advlist/plugin.js b/plugins/advlist/plugin.js
index bd3467f3..6dc32b66 100644
--- a/plugins/advlist/plugin.js
+++ b/plugins/advlist/plugin.js
@@ -132,7 +132,7 @@ var advlist = (function () {
if (styles.length > 0) {
addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
} else {
- addButton(editor, id, tooltip, cmd, nodeName, styles);
+ addButton(editor, id, tooltip, cmd, nodeName);
}
};
var register$1 = function (editor) {
diff --git a/plugins/autosave/plugin.js b/plugins/autosave/plugin.js
index ddee4d35..4ef15516 100644
--- a/plugins/autosave/plugin.js
+++ b/plugins/autosave/plugin.js
@@ -1,5 +1,5 @@
(function () {
-var autosave = (function () {
+var autosave = (function (domGlobals) {
'use strict';
var Cell = function (initial) {
@@ -51,9 +51,9 @@ var autosave = (function () {
};
var getAutoSavePrefix = function (editor) {
var prefix = editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-');
- prefix = prefix.replace(/\{path\}/g, document.location.pathname);
- prefix = prefix.replace(/\{query\}/g, document.location.search);
- prefix = prefix.replace(/\{hash\}/g, document.location.hash);
+ prefix = prefix.replace(/\{path\}/g, domGlobals.document.location.pathname);
+ prefix = prefix.replace(/\{query\}/g, domGlobals.document.location.search);
+ prefix = prefix.replace(/\{hash\}/g, domGlobals.document.location.hash);
prefix = prefix.replace(/\{id\}/g, editor.id);
return prefix;
};
@@ -165,7 +165,7 @@ var autosave = (function () {
return msg;
};
var setup = function (editor) {
- window.onbeforeunload = global$3._beforeUnloadHandler;
+ domGlobals.window.onbeforeunload = global$3._beforeUnloadHandler;
};
var postRender = function (editor, started) {
@@ -198,7 +198,7 @@ var autosave = (function () {
global.add('autosave', function (editor) {
var started = Cell(false);
- setup(editor);
+ setup();
register(editor, started);
editor.on('init', function () {
if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
@@ -212,5 +212,5 @@ var autosave = (function () {
return Plugin;
-}());
+}(window));
})();
diff --git a/plugins/autosave/plugin.min.js b/plugins/autosave/plugin.min.js
index b2c90a07..1eab7201 100644
--- a/plugins/autosave/plugin.min.js
+++ b/plugins/autosave/plugin.min.js
@@ -1 +1 @@
-!function(){"use strict";var a=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return a(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var n=t||e,r=/^(\d+)([ms]?)$/.exec(""+n);return(r[2]?{s:1e3,m:6e4}[r[2]]:1)*parseInt(n,10)},u=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,t.id)},s=function(t,e){var n=t.settings.forced_root_block;return""===(e=o.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+n+"[^>]*>((\xa0| |[ \t]|
]*>)+?|)"+n+">|
$","i").test(e)},c=function(t){var e=parseInt(r.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.settings.autosave_retention,"20m")&&(f(t,!1),1))},f=function(t,e){var n=u(t);r.removeItem(n+"draft"),r.removeItem(n+"time"),!1!==e&&t.fire("RemoveDraft")},l=function(t){var e=u(t);!s(t)&&t.isDirty()&&(r.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),r.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},m=function(t){var e=u(t);c(t)&&(t.setContent(r.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t,e){var n=i(t.settings.autosave_interval,"30s");e.get()||(setInterval(function(){t.removed||l(t)},n),e.set(!0))},d=function(t){t.undoManager.transact(function(){m(t),f(t)}),t.focus()};function g(r){for(var o=[],t=1;t]*>((\xa0| |[ \t]|
]*>)+?|)"+n+">|
$","i").test(e)},f=function(t){var e=parseInt(r.getItem(s(t)+"time"),10)||0;return!((new Date).getTime()-e>u(t.settings.autosave_retention,"20m")&&(l(t,!1),1))},l=function(t,e){var n=s(t);r.removeItem(n+"draft"),r.removeItem(n+"time"),!1!==e&&t.fire("RemoveDraft")},m=function(t){var e=s(t);!c(t)&&t.isDirty()&&(r.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),r.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},v=function(t){var e=s(t);f(t)&&(t.setContent(r.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},d=function(t,e){var n=u(t.settings.autosave_interval,"30s");e.get()||(setInterval(function(){t.removed||m(t)},n),e.set(!0))},g=function(t){t.undoManager.transact(function(){v(t),l(t)}),t.focus()};function y(r){for(var o=[],t=1;t' + env.content + '' + env.tag + '>';
};
@@ -963,5 +963,5 @@ var codesample = (function () {
return Plugin;
-}());
+}(window));
})();
diff --git a/plugins/codesample/plugin.min.js b/plugins/codesample/plugin.min.js
index 8f7373cc..c50f3b25 100644
--- a/plugins/codesample/plugin.min.js
+++ b/plugins/codesample/plugin.min.js
@@ -1 +1 @@
-!function(){"use strict";var n=function(e){var t=e,a=function(){return t};return{get:a,set:function(e){t=e},clone:function(){return n(a())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(e){return e.settings.codesample_content_css},a=function(e){return e.settings.codesample_languages},o=function(e){return Math.min(i.DOM.getViewPort().w,e.getParam("codesample_dialog_width",800))},l=function(e){return Math.min(i.DOM.getViewPort().w,e.getParam("codesample_dialog_height",650))},t={},r=t,u=void 0!==t?t:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},c=function(){var c=/\blang(?:uage)?-(?!\*)(\w+)\b/i,S=u.Prism={util:{encode:function(e){return e instanceof o?new o(e.type,S.util.encode(e.content),e.alias):"Array"===S.util.type(e)?e.map(S.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(!(h instanceof n)){c.lastIndex=0;var m=c.exec(h);if(m){g&&(d=m[1].length);var b=m.index-1+d,y=b+(m=m[0].slice(d)).length,v=h.slice(0,b+1),k=h.slice(y+1),w=[f,1];v&&w.push(v);var x=new n(s,u?S.tokenize(m,u):m,p);w.push(x),k&&w.push(k),Array.prototype.splice.apply(i,w)}}}}}return i},hooks:{all:{},add:function(e,t){var a=S.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=S.hooks.all[e];if(a&&a.length)for(var n=0,i=void 0;i=a[n++];)i(t)}}},o=S.Token=function(e,t,a){this.type=e,this.content=t,this.alias=a};if(o.stringify=function(t,a,e){if("string"==typeof t)return t;if("Array"===S.util.type(t))return t.map(function(e){return o.stringify(e,a,t)}).join("");var n={type:t.type,content:o.stringify(t.content,a,e),tag:"span",classes:["token",t.type],attributes:{},language:a,parent:e};if("comment"===n.type&&(n.attributes.spellcheck="true"),t.alias){var i="Array"===S.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(n.classes,i)}S.hooks.run("wrap",n);var r="";for(var s in n.attributes)r+=(r?" ":"")+s+'="'+(n.attributes[s]||"")+'"';return"<"+n.tag+' class="'+n.classes.join(" ")+'" '+r+">"+n.content+""+n.tag+">"},!u.document)return u.addEventListener&&u.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,n=t.code,i=t.immediateClose;u.postMessage(S.highlight(n,S.languages[a],a)),i&&u.close()},!1),u.Prism}();void 0!==r&&(r.Prism=c),c.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},c.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),c.languages.xml=c.languages.markup,c.languages.html=c.languages.markup,c.languages.mathml=c.languages.markup,c.languages.svg=c.languages.markup,c.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},c.languages.css.atrule.inside.rest=c.util.clone(c.languages.css),c.languages.markup&&(c.languages.insertBefore("markup","tag",{style:{pattern:/