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

Side by Side Diff: tools/dom/src/Validators.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: Removing paranoia around tagName, which wasn't likely to work anyway Created 5 years, 6 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:
View unified diff | Download patch
« no previous file with comments | « tests/html/node_validator_important_if_you_suppress_make_the_bug_critical_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.dom.html; 5 part of dart.dom.html;
6 6
7 7
8 /** 8 /**
9 * Interface used to validate that only accepted elements and attributes are 9 * Interface used to validate that only accepted elements and attributes are
10 * allowed while parsing HTML strings into DOM nodes. 10 * allowed while parsing HTML strings into DOM nodes.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (element is TemplateElement) { 246 if (element is TemplateElement) {
247 TemplateElement template = element; 247 TemplateElement template = element;
248 sanitizeTree(template.content); 248 sanitizeTree(template.content);
249 } 249 }
250 } 250 }
251 251
252 /// Sanitize the node and its children recursively. 252 /// Sanitize the node and its children recursively.
253 void sanitizeNode(Node node, Node parent) { 253 void sanitizeNode(Node node, Node parent) {
254 switch (node.nodeType) { 254 switch (node.nodeType) {
255 case Node.ELEMENT_NODE: 255 case Node.ELEMENT_NODE:
256 _sanitizeUntrustedElement(node, parent); 256 _sanitizeUntrustedElement(node, parent);
257 break; 257 break;
258 case Node.COMMENT_NODE: 258 case Node.COMMENT_NODE:
259 case Node.DOCUMENT_FRAGMENT_NODE: 259 case Node.DOCUMENT_FRAGMENT_NODE:
260 case Node.TEXT_NODE: 260 case Node.TEXT_NODE:
261 case Node.CDATA_SECTION_NODE: 261 case Node.CDATA_SECTION_NODE:
262 break; 262 break;
263 default: 263 default:
264 _removeNode(node, parent); 264 _removeNode(node, parent);
265 } 265 }
266 } 266 }
267 } 267 }
OLDNEW
« no previous file with comments | « tests/html/node_validator_important_if_you_suppress_make_the_bug_critical_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698