MDL-47002 editor_atto: Remove all after html when pasting
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
dd504eded3
commit
5aa2e6a6c8
+2
@@ -828,6 +828,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
-2
File diff suppressed because one or more lines are too long
+2
@@ -824,6 +824,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