MDL-47002 editor_atto: Remove all after html when pasting
This commit is contained in:
+2
@@ -1288,6 +1288,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.
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+2
@@ -1277,6 +1277,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.
|
||||
|
||||
+2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user