| Index: tools/dom/src/NodeValidatorBuilder.dart
|
| diff --git a/tools/dom/src/NodeValidatorBuilder.dart b/tools/dom/src/NodeValidatorBuilder.dart
|
| index 4a412325bd30ba1bf628e02184d54852f7e7a786..f884caeb4420dedfb96cd6550e7cc68c0a7763e5 100644
|
| --- a/tools/dom/src/NodeValidatorBuilder.dart
|
| +++ b/tools/dom/src/NodeValidatorBuilder.dart
|
| @@ -358,11 +358,11 @@ class _SimpleNodeValidator implements NodeValidator {
|
| }
|
|
|
| bool allowsElement(Element element) {
|
| - return allowedElements.contains(element.tagName);
|
| + return allowedElements.contains(element._safeTagName);
|
| }
|
|
|
| bool allowsAttribute(Element element, String attributeName, String value) {
|
| - var tagName = element.tagName;
|
| + var tagName = element._safeTagName;
|
| if (allowedUriAttributes.contains('$tagName::$attributeName')) {
|
| return uriPolicy.allowsUri(value);
|
| } else if (allowedUriAttributes.contains('*::$attributeName')) {
|
| @@ -403,10 +403,10 @@ class _CustomElementNodeValidator extends _SimpleNodeValidator {
|
| var isAttr = element.attributes['is'];
|
| if (isAttr != null) {
|
| return allowedElements.contains(isAttr.toUpperCase()) &&
|
| - allowedElements.contains(element.tagName);
|
| + allowedElements.contains(element._safeTagName);
|
| }
|
| }
|
| - return allowCustomTag && allowedElements.contains(element.tagName);
|
| + return allowCustomTag && allowedElements.contains(element._safeTagName);
|
| }
|
|
|
| bool allowsAttribute(Element element, String attributeName, String value) {
|
| @@ -462,7 +462,7 @@ class _SvgNodeValidator implements NodeValidator {
|
| // foreignobject tag as SvgElement. We don't want foreignobject contents
|
| // anyway, so just remove the whole tree outright. And we can't rely
|
| // on IE recognizing the SvgForeignObject type, so go by tagName. Bug 23144
|
| - if (element is svg.SvgElement && element.tagName == 'foreignObject') {
|
| + if (element is svg.SvgElement && element._safeTagName == 'foreignObject') {
|
| return false;
|
| }
|
| if (element is svg.SvgElement) {
|
|
|