MDL-47002 editor_atto: Remove all after html when pasting
authorDavid Monllao <davidm@moodle.com>
Thu, 26 Mar 2015 08:15:29 +0000 (16:15 +0800)
committerDavid Monllao <davidm@moodle.com>
Thu, 26 Mar 2015 08:15:29 +0000 (16:15 +0800)
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js
lib/editor/atto/yui/src/editor/js/clean.js

index 7b6083d..f0a64d2 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js differ
index 6f26a44..4a2dac8 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js differ
index 4a50db5..07dbddc 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js differ
index 5addd03..f7a3ecf 100644 (file)
@@ -263,6 +263,8 @@ EditorClean.prototype = {
         // Rules that get rid of the real-nasties and don't care about normalize code (correct quotes, white spaces, etc).
         var rules = [
             // Stuff that is specifically from MS Word and similar office packages.
+            // Remove all garbage after closing html tag.
+            {regex: /<\s*\/html\s*>([\s\S]+)$/gi, replace: ""},
             // Remove if comment blocks.
             {regex: /<!--\[if[\s\S]*?endif\]-->/gi, replace: ""},
             // Remove start and end fragment comment blocks.