From cfb32192d613e280c8d24b6517c24c6848e38bba Mon Sep 17 00:00:00 2001 From: David Monllao Date: Thu, 26 Mar 2015 16:15:29 +0800 Subject: [PATCH] MDL-47002 editor_atto: Remove all after html when pasting --- .../moodle-editor_atto-editor-debug.js | Bin 74523 -> 74645 bytes .../moodle-editor_atto-editor-min.js | Bin 18432 -> 18480 bytes .../moodle-editor_atto-editor.js | Bin 73388 -> 73510 bytes lib/editor/atto/yui/src/editor/js/clean.js | 2 ++ 4 files changed, 2 insertions(+) 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 7b6083dd96a2251f33a98111fbf5ce0b148fc489..f0a64d2affe6cee1cde61641589ade10601d677f 100644 GIT binary patch delta 81 zcmbPzjAiO^mJKuKDJACQD5NJAB_*b(DkP?rq!uY8=j0b>=A|oSl;q|plq9B4o;Y7Z iJf>JHMjs>sWY}p$#}vl|$7*Y;Og=bYbMwr3O)UT$vmd7b delta 14 WcmbPwoMrYgmJKuKZ5E#2)B*rCn+F&G 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 6f26a449fa3b5b7730ba2540bbcb7b8e4f340f50..4a2dac8e5430826fbdc81ba3587e70f7a5cc6f9e 100644 GIT binary patch delta 68 zcmZpez_z>% delta 40 vcmdlmfw5r%=A|oSl;q|plq9B4elSZy iJf>JHMjs>sWY}p$#}vl|$7*Y;OctE2x%vF8yUhSKhad|8 delta 14 WcmZ3sk7dnXmJR1;ZT6gfw;2FASO?|+ diff --git a/lib/editor/atto/yui/src/editor/js/clean.js b/lib/editor/atto/yui/src/editor/js/clean.js index 5addd03a266..f7a3ecf40f7 100644 --- a/lib/editor/atto/yui/src/editor/js/clean.js +++ b/lib/editor/atto/yui/src/editor/js/clean.js @@ -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: //gi, replace: ""}, // Remove start and end fragment comment blocks. -- 2.43.0