mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'wip-MDL-50795-master' of git://github.com/abgreeve/moodle
This commit is contained in:
commit
6a3116dd3c
@ -1314,6 +1314,8 @@ EditorClean.prototype = {
|
|||||||
{regex: /(<[^>]*?style\s*?=\s*?")([^>"]*)(")/gi, replace: function(match, group1, group2, group3) {
|
{regex: /(<[^>]*?style\s*?=\s*?")([^>"]*)(")/gi, replace: function(match, group1, group2, group3) {
|
||||||
// Remove MSO-blah, MSO:blah style attributes.
|
// Remove MSO-blah, MSO:blah style attributes.
|
||||||
group2 = group2.replace(/(?:^|;)[\s]*MSO[-:](?:&[\w]*;|[^;"])*/gi,"");
|
group2 = group2.replace(/(?:^|;)[\s]*MSO[-:](?:&[\w]*;|[^;"])*/gi,"");
|
||||||
|
// Remove backgroud color style.
|
||||||
|
group2 = group2.replace(/background-color:.*?;/gi,"");
|
||||||
return group1 + group2 + group3;
|
return group1 + group2 + group3;
|
||||||
}},
|
}},
|
||||||
// Get all class attributes so we can work on them.
|
// Get all class attributes so we can work on them.
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1303,6 +1303,8 @@ EditorClean.prototype = {
|
|||||||
{regex: /(<[^>]*?style\s*?=\s*?")([^>"]*)(")/gi, replace: function(match, group1, group2, group3) {
|
{regex: /(<[^>]*?style\s*?=\s*?")([^>"]*)(")/gi, replace: function(match, group1, group2, group3) {
|
||||||
// Remove MSO-blah, MSO:blah style attributes.
|
// Remove MSO-blah, MSO:blah style attributes.
|
||||||
group2 = group2.replace(/(?:^|;)[\s]*MSO[-:](?:&[\w]*;|[^;"])*/gi,"");
|
group2 = group2.replace(/(?:^|;)[\s]*MSO[-:](?:&[\w]*;|[^;"])*/gi,"");
|
||||||
|
// Remove backgroud color style.
|
||||||
|
group2 = group2.replace(/background-color:.*?;/gi,"");
|
||||||
return group1 + group2 + group3;
|
return group1 + group2 + group3;
|
||||||
}},
|
}},
|
||||||
// Get all class attributes so we can work on them.
|
// Get all class attributes so we can work on them.
|
||||||
|
2
lib/editor/atto/yui/src/editor/js/clean.js
vendored
2
lib/editor/atto/yui/src/editor/js/clean.js
vendored
@ -290,6 +290,8 @@ EditorClean.prototype = {
|
|||||||
{regex: /(<[^>]*?style\s*?=\s*?")([^>"]*)(")/gi, replace: function(match, group1, group2, group3) {
|
{regex: /(<[^>]*?style\s*?=\s*?")([^>"]*)(")/gi, replace: function(match, group1, group2, group3) {
|
||||||
// Remove MSO-blah, MSO:blah style attributes.
|
// Remove MSO-blah, MSO:blah style attributes.
|
||||||
group2 = group2.replace(/(?:^|;)[\s]*MSO[-:](?:&[\w]*;|[^;"])*/gi,"");
|
group2 = group2.replace(/(?:^|;)[\s]*MSO[-:](?:&[\w]*;|[^;"])*/gi,"");
|
||||||
|
// Remove backgroud color style.
|
||||||
|
group2 = group2.replace(/background-color:.*?;/gi,"");
|
||||||
return group1 + group2 + group3;
|
return group1 + group2 + group3;
|
||||||
}},
|
}},
|
||||||
// Get all class attributes so we can work on them.
|
// Get all class attributes so we can work on them.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user