Composer: Some parts of HTML not always converted into Plain Text
When traversing the HTML structure the to-be-removed nodes in the middle of the text could prevent correct move between nodes, by traversing into them and immediately removing the node.
This commit is contained in:
@ -2311,6 +2311,9 @@ EvoEditor.convertTags = function()
|
||||
|
||||
/* Keep the signature SPAN there, it's required */
|
||||
if (node.nodeType == node.ELEMENT_NODE && (node.tagName != "SPAN" || node.className != "-x-evo-signature")) {
|
||||
node.removeAttribute("class");
|
||||
node.removeAttribute("style");
|
||||
|
||||
if (node.tagName != "DIV" &&
|
||||
node.tagName != "PRE" &&
|
||||
node.tagName != "BLOCKQUOTE" &&
|
||||
@ -2334,6 +2337,7 @@ EvoEditor.convertTags = function()
|
||||
node.tagName != "STYLE" &&
|
||||
node.tagName != "SCRIPT" &&
|
||||
node.tagName != "TEMPLATE" &&
|
||||
node.tagName != "TITLE" &&
|
||||
node.tagName != "VAR" &&
|
||||
node.tagName != "VIDEO") {
|
||||
next = EvoEditor.moveNodeContent(node);
|
||||
@ -2341,6 +2345,10 @@ EvoEditor.convertTags = function()
|
||||
}
|
||||
}
|
||||
|
||||
/* Do not traverse into the to-be-removed node */
|
||||
if (!next && removeNode)
|
||||
next = node.nextSibling;
|
||||
|
||||
if (!next)
|
||||
next = EvoEditor.getNextNodeInHierarchy(node, document.body);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user