Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 1148893004: Make sanitizer tests handle IE11, where tagName can't be clobbered (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index c272f55c8658ef392d1e094b9231b54caa8eb409..2e7a051bbdd51f21ce560c3c466b8d7062c3931a 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -40752,6 +40752,9 @@ class _ValidatingTreeSanitizer implements NodeTreeSanitizer {
var elementTagName = 'element tag unavailable';
try {
elementTagName = element.tagName;
+ if (elementTagName != elementTagName.toString() {
+ corrupted = true; // The tag name is not a string
+ }
} catch(e) {}
_sanitizeElement(element, parent, corrupted, elementText, elementTagName,
attrs, isAttr);
@@ -40807,7 +40810,7 @@ class _ValidatingTreeSanitizer implements NodeTreeSanitizer {
void sanitizeNode(Node node, Node parent) {
switch (node.nodeType) {
case Node.ELEMENT_NODE:
- _sanitizeUntrustedElement(node, parent);
+ _sanitizeUntrustedElement(node, parent);
break;
case Node.COMMENT_NODE:
case Node.DOCUMENT_FRAGMENT_NODE:

Powered by Google App Engine
This is Rietveld 408576698