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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/src/Validators.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 2063e0bcdf505a650d62affe79caffc733c7d090..e1ce5b66792c6be8779b37b4982c959607f863ca 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -40822,6 +40822,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);
@@ -40877,7 +40880,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:
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/src/Validators.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698