CETEIcean 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/defaultBehaviors.js +3 -1
- package/src/utilities.js +1 -1
package/package.json
CHANGED
package/src/defaultBehaviors.js
CHANGED
@@ -97,12 +97,14 @@ export default {
|
|
97
97
|
"egXML": function(elt) {
|
98
98
|
const doc = elt.ownerDocument;
|
99
99
|
let pre = doc.createElement("pre");
|
100
|
+
let code = doc.createElement("code");
|
101
|
+
pre.appendChild(code);
|
100
102
|
let content = this.serialize(elt, true).replace(/</g, "<");
|
101
103
|
let ws = content.match(/^[\t ]+/);
|
102
104
|
if (ws) {
|
103
105
|
content = content.replace(new RegExp("^" + ws[0], "mg"), "");
|
104
106
|
}
|
105
|
-
|
107
|
+
code.innerHTML = content;
|
106
108
|
return pre;
|
107
109
|
}
|
108
110
|
}
|
package/src/utilities.js
CHANGED
@@ -298,7 +298,7 @@ export function serializeHTML(el, stripElt, ws) {
|
|
298
298
|
if ((typeof ws === "string") && ignorable(node.nodeValue)) {
|
299
299
|
break;
|
300
300
|
}
|
301
|
-
str += node.nodeValue;
|
301
|
+
str += node.nodeValue.replace(/</g, "<");
|
302
302
|
}
|
303
303
|
}
|
304
304
|
if (!EMPTY_ELEMENTS.includes(el.nodeName)) {
|