Merge branch 'MDL-49565-28' of git://github.com/merrill-oakland/moodle into MOODLE_28_STABLE
This commit is contained in:
+5
-5
@@ -1108,11 +1108,6 @@ EditorClean.prototype = {
|
||||
// Reference: "http://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work"
|
||||
{regex: /<style[^>]*>[\s\S]*?<\/style>/gi, replace: ""},
|
||||
|
||||
// Source: "http://stackoverflow.com/questions/2875027/clean-microsoft-word-pasted-text-using-javascript"
|
||||
// Source: "http://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work"
|
||||
// Remove all HTML comments.
|
||||
{regex: /<!--[\s\S]*?-->/gi, replace: ""},
|
||||
|
||||
// Remove any open HTML comment opens that are not followed by a close. This can completely break page layout.
|
||||
{regex: /<!--(?![\s\S]*?-->)/gi, replace: ""},
|
||||
|
||||
@@ -1283,6 +1278,11 @@ 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 if comment blocks.
|
||||
{regex: /<!--\[if[\s\S]*?endif\]-->/gi, replace: ""},
|
||||
// Remove start and end fragment comment blocks.
|
||||
{regex: /<!--(Start|End)Fragment-->/gi, replace: ""},
|
||||
// Remove any xml blocks.
|
||||
{regex: /<xml[^>]*>[\s\S]*?<\/xml>/gi, replace: ""},
|
||||
// Remove any <?xml><\?xml> blocks.
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+5
-5
@@ -1098,11 +1098,6 @@ EditorClean.prototype = {
|
||||
// Reference: "http://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work"
|
||||
{regex: /<style[^>]*>[\s\S]*?<\/style>/gi, replace: ""},
|
||||
|
||||
// Source: "http://stackoverflow.com/questions/2875027/clean-microsoft-word-pasted-text-using-javascript"
|
||||
// Source: "http://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work"
|
||||
// Remove all HTML comments.
|
||||
{regex: /<!--[\s\S]*?-->/gi, replace: ""},
|
||||
|
||||
// Remove any open HTML comment opens that are not followed by a close. This can completely break page layout.
|
||||
{regex: /<!--(?![\s\S]*?-->)/gi, replace: ""},
|
||||
|
||||
@@ -1272,6 +1267,11 @@ 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 if comment blocks.
|
||||
{regex: /<!--\[if[\s\S]*?endif\]-->/gi, replace: ""},
|
||||
// Remove start and end fragment comment blocks.
|
||||
{regex: /<!--(Start|End)Fragment-->/gi, replace: ""},
|
||||
// Remove any xml blocks.
|
||||
{regex: /<xml[^>]*>[\s\S]*?<\/xml>/gi, replace: ""},
|
||||
// Remove any <?xml><\?xml> blocks.
|
||||
|
||||
+5
-5
@@ -92,11 +92,6 @@ EditorClean.prototype = {
|
||||
// Reference: "http://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work"
|
||||
{regex: /<style[^>]*>[\s\S]*?<\/style>/gi, replace: ""},
|
||||
|
||||
// Source: "http://stackoverflow.com/questions/2875027/clean-microsoft-word-pasted-text-using-javascript"
|
||||
// Source: "http://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work"
|
||||
// Remove all HTML comments.
|
||||
{regex: /<!--[\s\S]*?-->/gi, replace: ""},
|
||||
|
||||
// Remove any open HTML comment opens that are not followed by a close. This can completely break page layout.
|
||||
{regex: /<!--(?![\s\S]*?-->)/gi, replace: ""},
|
||||
|
||||
@@ -267,6 +262,11 @@ 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 if comment blocks.
|
||||
{regex: /<!--\[if[\s\S]*?endif\]-->/gi, replace: ""},
|
||||
// Remove start and end fragment comment blocks.
|
||||
{regex: /<!--(Start|End)Fragment-->/gi, replace: ""},
|
||||
// Remove any xml blocks.
|
||||
{regex: /<xml[^>]*>[\s\S]*?<\/xml>/gi, replace: ""},
|
||||
// Remove any <?xml><\?xml> blocks.
|
||||
|
||||
Reference in New Issue
Block a user