diff --git a/src/dom/parse.js b/src/dom/parse.js index f7868f94..91e5aea3 100644 --- a/src/dom/parse.js +++ b/src/dom/parse.js @@ -213,6 +213,7 @@ wysihtml5.dom.parse = (function() { addClass = rule.add_class, // add classes based on existing attributes setAttributes = rule.set_attributes, // attributes to set on the current node checkAttributes = rule.check_attributes, // check/convert values of attributes + allowAttributes = rule.allow_attributes, // copy attributes from old to new node allowedClasses = currentRules.classes, i = 0, classes = [], @@ -231,6 +232,17 @@ wysihtml5.dom.parse = (function() { attributes = wysihtml5.lang.object(setAttributes).clone(); } + if (allowAttributes) { + allowAttributesLength = allowAttributes.length; + for (i = 0; i