diff --git a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
index 29e2742bac3..2e137381d6d 100644
--- a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
+++ b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
@@ -1796,7 +1796,7 @@ EditorClean.prototype = {
// Use a regular expression to find the next open or close li, ul, or ol tag.
// Keep going until there are no more matching tags left.
- while ((match = toProcess.match(/<(\/?)(li|ul|ol)[^>]*>/i))) {
+ while ((match = toProcess.match(/<(\/?)(li|ul|ol)\b[^>]*>/i))) {
currentTag = {
tag: match[2],
tagLowerCase: match[2].toLowerCase(),
diff --git a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
index 7edcb90f912..bb8d48fb97f 100644
--- a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
+++ b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
@@ -1,5 +1,5 @@
YUI.add("moodle-editor_atto-editor",function(r,u){var s,a,n,i={CONTENT:"editor_atto_content",CONTENTWRAPPER:"editor_atto_content_wrap",TOOLBAR:"editor_atto_toolbar",WRAPPER:"editor_atto",HIGHLIGHT:"highlight"},o=window.rangy;function t(){t.superclass.constructor.apply(this,arguments)}function e(){}function l(){}function h(){}function c(){c.superclass.constructor.apply(this,arguments),this._submitEvents={},this._queue=[],this._throttle=null}function d(){}function g(){}function p(){}function f(){}function m(){}function v(){}function b(){}function _(){}r.extend(t,r.Base,{BLOCK_TAGS:["address","article","aside","audio","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","noscript","ol","output","p","pre","section","table","tfoot","ul","video"],PLACEHOLDER_CLASS:"atto-tmp-class",ALL_NODES_SELECTOR:"[style],font[face]",FONT_FAMILY:"fontFamily",_wrapper:null,editor:null,textarea:null,textareaLabel:null,plugins:null,coreDirection:null,_eventHandles:null,initializer:function(){var t,e;this.textarea=r.one(document.getElementById(this.get("elementid"))),this.textarea&&(e=this.textarea.getAttribute("class"),this._eventHandles=[],t=r.Node.create('
'+M.util.get_string("richtexteditor","editor_atto")+"
"),this._wrapper=r.Node.create(''),this._wrapper.appendChild(t),this._wrapper.setAttribute("aria-describedby",t.generateID()),t=r.Handlebars.compile(''),this.editor=r.Node.create(t({elementid:this.get("elementid"),CSS:i})),this.textareaLabel=r.one('[for="'+this.get("elementid")+'"]'),this.textareaLabel&&(this.textareaLabel.generateID(),this.editor.setAttribute("aria-labelledby",this.textareaLabel.get("id"))),this.coreDirection=r.one("body").hasClass("dir-rtl")?"rtl":"ltr",this.setupToolbar(),(e=r.Node.create('')).appendChild(this.editor),this._wrapper.appendChild(e),this.editor.setStyle("minHeight",20*this.textarea.getAttribute("rows")+8+"px"),0===r.UA.ie&&this.editor.setStyle("height",20*this.textarea.getAttribute("rows")+8+"px"),this.disableCssStyling(),document.queryCommandSupported("DefaultParagraphSeparator")&&document.execCommand("DefaultParagraphSeparator",!1,"p"),this.textarea.get("parentNode").insert(this._wrapper,this.textarea).setAttribute("class","editor_atto_wrap"),this.textarea.hide(),r.mix(r.Node.DOM_EVENTS,{"form:editorUpdated":!0}),this.textarea.on("form:editorUpdated",function(){this.updateEditorState()},this),this.updateFromTextArea(),this.publishEvents(),this.setupSelectionWatchers(),this.setupAutomaticPolling(),this.setupPlugins(),this.setupAutosave(),this.setupNotifications())},focus:function(){return this.editor.focus(),this},publishEvents:function(){return this.publish("change",{broadcast:!0,preventable:!0}),this.publish("pluginsloaded",{fireOnce:!0}),this.publish("atto:selectionchanged",{prefix:"atto"}),this},setupAutomaticPolling:function(){return this._registerEventHandle(this.editor.on(["keyup","cut"],this.updateOriginal,this)),this._registerEventHandle(this.editor.on("paste",this.pasteCleanup,this)),this._registerEventHandle(this.editor.on("drop",this.updateOriginalDelayed,this)),this},updateOriginalDelayed:function(){return r.soon(r.bind(this.updateOriginal,this)),this},setupPlugins:function(){var t,e,i,n,s,a;for(e in this.plugins={},t=this.get("plugins"))if((i=t[e]).plugins)for(n in i.plugins)s=i.plugins[n],a=r.mix({name:s.name,group:i.group,editor:this.editor,toolbar:this.toolbar,host:this},s),"undefined"!=typeof r.M["atto_"+s.name]&&(this.plugins[s.name]=new r.M["atto_"+s.name].Button(a));return this.fire("pluginsloaded"),this},enablePlugins:function(t){this._setPluginState(!0,t)},disablePlugins:function(t){this._setPluginState(!1,t)},_setPluginState:function(t,e){var i=t?"enableButtons":"disableButtons";e?this.plugins[e][i]():r.Object.each(this.plugins,function(t){t[i]()},this)},updateEditorState:function(){var t=this.textarea.hasAttribute("readonly"),e=r.one("#"+this.get("elementid")+"editable");this._setPluginState(!t),e&&e.setAttribute("contenteditable",!t)},_registerEventHandle:function(t){this._eventHandles.push(t)}},{NS:"editor_atto",ATTRS:{elementid:{value:null,writeOnce:!0},contextid:{value:null,writeOnce:!0},plugins:{value:{},writeOnce:!0}}}),r.augment(t,r.EventTarget),r.namespace("M.editor_atto").Editor=t,r.namespace("M.editor_atto.Editor").init=function(t){return new r.M.editor_atto.Editor(t)},s="info",a="warning",e.ATTRS={},e.prototype={messageOverlay:null,hideTimer:null,setupNotifications:function(){var t=new Image,e=new Image;return t.src=M.util.image_url("i/warning","moodle"),e.src=M.util.image_url("i/info","moodle"),this},showMessage:function(t,e,i){var n="";return null===this.messageOverlay&&(this.messageOverlay=r.Node.create(''),this.messageOverlay.hide(!0),this.textarea.get("parentNode").append(this.messageOverlay),this.messageOverlay.on("click",function(){this.messageOverlay.hide(!0)},this)),null!==this.hideTimer&&this.hideTimer.cancel(),e===a?n='
':e===s&&(n='
'),(i=parseInt(i,10))<=0&&(i=6e4),e=r.Node.create(''+n+" "+r.Escape.html(t)+"
"),this.messageOverlay.empty(),this.messageOverlay.append(e),this.messageOverlay.show(!0),this.hideTimer=r.later(i,this,function(){this.hideTimer=null,this.messageOverlay.inDoc()&&this.messageOverlay.hide(!0)}),this}},r.Base.mix(r.M.editor_atto.Editor,[e]),l.ATTRS={},l.prototype={_getEmptyContent:function(){
var t="rtl"===this.coreDirection?'style="text-align: right;"':'style="text-align: left;"';return r.UA.ie&&r.UA.ie<10?'":'
"},updateFromTextArea:function(){return this.editor.setHTML(""),this.editor.append(this._cleanHTML(this.textarea.get("value"),!0)),""===this.editor.getHTML()&&this.editor.setHTML(this._getEmptyContent()),this},updateOriginal:function(){var t=this.textarea.get("value"),e=this.getCleanHTML();return t!==(e=""===e&&this.isActive()?this._getEmptyContent():e)&&(this.textarea.set("value",e),this.textarea.simulate("change"),this.fire("change")),this}},r.Base.mix(r.M.editor_atto.Editor,[l]),h.ATTRS={autosaveEnabled:{value:!0,writeOnce:!0},autosaveFrequency:{value:60,writeOnce:!0},pageHash:{value:"",writeOnce:!0}},h.prototype={lastText:"",autosaveInstance:null,autosaveTimer:null,setupAutosave:function(){var t,e=-1,i=null,n=this.get("filepickeroptions");if(this.get("autosaveEnabled")){for(i in this.autosaveInstance=r.stamp(this),n)"undefined"!=typeof n[i].itemid&&(e=n[i].itemid);return t={contextid:this.get("contextid"),action:"resume",draftid:e,elementid:this.get("elementid"),pageinstance:this.autosaveInstance,pagehash:this.get("pageHash")},this.autosaveIo(t,this,{success:function(t){null!==t&&t&&(["","
","
",'','
','','
',"
","
",'
','
','
','
'].includes(t.result)&&(t.result=""),t.error||"undefined"==typeof t.result?this.showMessage(M.util.get_string("errortextrecovery","editor_atto"),a,6e4):t.result!==this.textarea.get("value")&&""!==t.result&&this.recoverText(t.result),this._fireSelectionChanged())},failure:function(){this.showMessage(M.util.get_string("errortextrecovery","editor_atto"),a,6e4)}}),t=1e3*parseInt(this.get("autosaveFrequency"),10),this.autosaveTimer=r.later(t,this,this.saveDraft,!1,!0),(t=this.textarea.ancestor("form"))&&this.autosaveIoOnSubmit(t,{action:"reset",contextid:this.get("contextid"),elementid:this.get("elementid"),pageinstance:this.autosaveInstance,pagehash:this.get("pageHash")}),this}},recoverText:function(t){return this.editor.setHTML(t),this.saveSelection(),this.updateOriginal(),this.lastText=t,this.showMessage(M.util.get_string("textrecovered","editor_atto"),s,6e4),require(["core_editor/events"],function(t){t.notifyEditorContentRestored(this.editor.getDOMNode())}.bind(this)),this},saveDraft:function(){var t,e,i;if(this.editor.getDOMNode())return this.editor.get("hidden")||this.updateOriginal(),(e=this.textarea.get("value"))!==this.lastText&&(M.cfg.wwwroot,this.get("autosaveAjaxScript"),t={sesskey:M.cfg.sesskey,contextid:this.get("contextid"),action:"save",drafttext:e,elementid:this.get("elementid"),pagehash:this.get("pageHash"),pageinstance:this.autosaveInstance},this.autosaveIo(t,this,{failure:i=function(t){var e=1e3*parseInt(this.get("autosaveFrequency"),10);this.showMessage(M.util.get_string("autosavefailed","editor_atto"),a,e)},success:function(t){t&&t.error?r.soon(r.bind(i,this,[t])):(this.lastText=e,this.showMessage(M.util.get_string("autosavesucceeded","editor_atto"),s,5e3))}})),this;this.autosaveTimer.cancel()}},r.Base.mix(r.M.editor_atto.Editor,[h]),n=null,c.NAME="EditorAutosaveIoDispatcher",c.ATTRS={autosaveAjaxScript:{value:"/lib/editor/atto/autosave-ajax.php",readOnly:!0},delay:{value:50,readOnly:!0}},r.extend(c,r.Base,{dispatch:function(t,e,i){this._throttle&&this._throttle.cancel(),this._throttle=r.later(this.get("delay"),this,this._processDispatchQueue),this._queue.push([t,e,i])},_processDispatchQueue:function(){var t=this._queue,i={};this._queue=[],t.length<1||(r.Array.each(t,function(t,e){i[e]=t[0]}),r.io(M.cfg.wwwroot+this.get("autosaveAjaxScript"),{method:"POST",data:r.QueryString.stringify({actions:i,sesskey:M.cfg.sesskey}),on:{start:this._makeIoEventCallback("start",t),complete:this._makeIoEventCallback("complete",t),failure:this._makeIoEventCallback("failure",t),end:this._makeIoEventCallback("end",t),success:this._makeIoEventCallback("success",t)}}))},_makeIoEventCallback:function(a,e){var o=function(){};return function(){var t=arguments[1],s={};"complete"!=a&&"success"!=a||void 0===t||"undefined"==typeof t.responseText||""===t.responseText||(s=JSON.parse(t.responseText)||{}),r.Array.each(e,function(t,e){var i,n=t[1],t=t[2]&&t[2][a]||o;s&&s.error?i=s:s&&(i=s[e]),t.apply(n,[i])})}},_onSubmit:function(t){var i={},t=t.currentTarget.generateID(),t=this._submitEvents[t];!t||t.ios.length<1||(r.Array.each(t.ios,function(t,e){i[e]=t}),r.io(M.cfg.wwwroot+this.get("autosaveAjaxScript"),{method:"POST",data:r.QueryString.stringify({actions:i,sesskey:M.cfg.sesskey}),sync:!0}))},whenSubmit:function(t,e){"undefined"==typeof this._submitEvents[t.generateID()]&&(this._submitEvents[t.generateID()]={event:t.on("submit",this._onSubmit,this),ajaxEvent:t.on(M.core.event.FORM_SUBMIT_AJAX,this._onSubmit,this),ios:[]}),this._submitEvents[t.get("id")].ios.push([e])}}),n=new c,d.prototype={autosaveIo:function(t,e,i){n.dispatch(t,e,i)},autosaveIoOnSubmit:function(t,e){n.whenSubmit(t,e)}},r.Base.mix(r.M.editor_atto.Editor,[d]),g.ATTRS={},g.prototype={getCleanHTML:function(){var t=this.editor.cloneNode(!0);return r.each(t.all('[id^="yui"]'),function(t){t.removeAttribute("id")}),t.all(".atto_control").remove(!0),t=t.get("innerHTML"),["","
","
",'','
','','
',"
","
",'
',
-'
','
','
'].includes(t)?"":this._cleanHTML(t)},cleanEditorHTML:function(){var t=this.editor.get("innerHTML");return this.editor.set("innerHTML",this._cleanHTML(t)),this},_cleanHTML:function(t,e){return t=this._filterContentWithRules(t,[{regex:/