projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #6048 - clean up hanging span content tags
[roojs1]
/
Roo
/
HtmlEditorCore.js
diff --git
a/Roo/HtmlEditorCore.js
b/Roo/HtmlEditorCore.js
index
9a3460e
..
c99e460
100644
(file)
--- a/
Roo/HtmlEditorCore.js
+++ b/
Roo/HtmlEditorCore.js
@@
-1040,6
+1040,11
@@
Roo.extend(Roo.HtmlEditorCore, Roo.Component, {
var remove_keep_children= Roo.HtmlEditorCore.remove.indexOf(node.tagName.toLowerCase()) > -1;
var remove_keep_children= Roo.HtmlEditorCore.remove.indexOf(node.tagName.toLowerCase()) > -1;
+ // spans with no attributes - just remove them..
+ if ((!node.attributes || !node.attributes.length) && lcname == 'span') {
+ remove_keep_children = true;
+ }
+
// remove <a name=....> as rendering on yahoo mailer is borked with this.
// this will have to be flaged elsewhere - perhaps ablack=name... on the mailer..
// remove <a name=....> as rendering on yahoo mailer is borked with this.
// this will have to be flaged elsewhere - perhaps ablack=name... on the mailer..
@@
-1060,6
+1065,10
@@
Roo.extend(Roo.HtmlEditorCore, Roo.Component, {
}
if (!node.attributes || !node.attributes.length) {
}
if (!node.attributes || !node.attributes.length) {
+
+
+
+
this.cleanUpChildren(node);
return;
}
this.cleanUpChildren(node);
return;
}
@@
-1156,11
+1165,11
@@
Roo.extend(Roo.HtmlEditorCore, Roo.Component, {
if (a.name == 'class') {
if (a.value.match(/^Mso/)) {
if (a.name == 'class') {
if (a.value.match(/^Mso/)) {
- node.
className = ''
;
+ node.
removeAttribute('class')
;
}
if (a.value.match(/^body$/)) {
}
if (a.value.match(/^body$/)) {
- node.
className = ''
;
+ node.
removeAttribute('class')
;
}
continue;
}
}
continue;
}