jenkins-bot has submitted this change and it was merged.
Change subject: Fix attribute-dropped warning.
......................................................................
Fix attribute-dropped warning.
<br title/ > is part of a parserTest; we do the right thing in that
case (that is, we ignore the bogus attribute, which is correct for
wt2html at least).
But don't dump text to console.log when the html5 parse algorithm is Doing
The Right Thing. You can enable this with HTML5.enableDebug() if needed.
Change-Id: I2a585a9f882aaf845b11f96bf30def03c2739414
---
M js/lib/html5/treebuilder.js
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
GWicke: Looks good to me, approved
jenkins-bot: Verified
diff --git a/js/lib/html5/treebuilder.js b/js/lib/html5/treebuilder.js
index e09e76f..558de78 100644
--- a/js/lib/html5/treebuilder.js
+++ b/js/lib/html5/treebuilder.js
@@ -22,8 +22,8 @@
at.namespace = attribute.namespace;
}
} else {
+ var name, value, namespace;
try {
- var name, value, namespace;
if ('namespaceURI' in attribute) { // DOM 4
name = attribute.name;
value = attribute.value;
@@ -39,7 +39,8 @@
element.setAttribute(name, value);
}
} catch(e) {
- console.log("Can't set attribute '" + attribute.name +
"' to value '" + attribute.value + "': (" + e + ')');
+ HTML5.debug('treebuilder.copyAttributes',
+ "Can't set attribute", name,
value, e);
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/59509
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a585a9f882aaf845b11f96bf30def03c2739414
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits