| Index: tools/dom/src/NodeValidatorBuilder.dart
|
| diff --git a/tools/dom/src/NodeValidatorBuilder.dart b/tools/dom/src/NodeValidatorBuilder.dart
|
| index c5f0c80542a90835393044215c1d36965ea7bdbf..41cab67cf9b140830fe4f3f189ecf9f6af5b1e85 100644
|
| --- a/tools/dom/src/NodeValidatorBuilder.dart
|
| +++ b/tools/dom/src/NodeValidatorBuilder.dart
|
| @@ -110,6 +110,21 @@ class NodeValidatorBuilder implements NodeValidator {
|
| }
|
|
|
| /**
|
| + * Allow inline styles on elements.
|
| + *
|
| + * If [tagName] is not specified then this allows inline styles on all
|
| + * elements. Otherwise tagName limits the styles to the specified elements.
|
| + */
|
| + void allowInlineStyles({String tagName}) {
|
| + if (tagName == null) {
|
| + tagName = '*';
|
| + } else {
|
| + tagName = tagName.toUpperCase();
|
| + }
|
| + add(new _SimpleNodeValidator(null, allowedAttributes: ['$tagName::style']));
|
| + }
|
| +
|
| + /**
|
| * Allow common safe HTML5 elements and attributes.
|
| *
|
| * This list is based off of the Caja whitelists at:
|
|
|