From 1ceb63804e5b3c53d1a9d665c65626ff15585f09 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 6 May 2021 11:49:17 +0530 Subject: [PATCH] guard against unrecognized HTML attributes. closes #620 --- www/lib/diff-dom/diffDOM.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/lib/diff-dom/diffDOM.js b/www/lib/diff-dom/diffDOM.js index deca9be40..32605e074 100755 --- a/www/lib/diff-dom/diffDOM.js +++ b/www/lib/diff-dom/diffDOM.js @@ -685,7 +685,9 @@ } if (objNode.attributes) { Object.keys(objNode.attributes).forEach(function(attribute) { - node.setAttribute(attribute, objNode.attributes[attribute]); + try { + node.setAttribute(attribute, objNode.attributes[attribute]); + } catch (e) { console.debug(e); } }); } if (objNode.childNodes) {