NodeValidatorBuilder.common constructor
Creates a new NodeValidatorBuilder which accepts common constructs.
By default this will accept HTML5 elements and attributes with the default UriPolicy and templating elements.
Notable syntax which is filtered:
- Only known-good HTML5 elements and attributes are allowed.
- All URLs must be same-origin, use allowNavigation and allowImages to specify additional URI policies.
- Inline-styles are not allowed.
- Custom element tags are disallowed, use allowCustomElement.
- Custom tags extensions are disallowed, use allowTagExtension.
- SVG Elements are not allowed, use allowSvg.
For scenarios where the HTML should only contain formatted text allowTextElements is more appropriate.
Use allowSvg to allow SVG elements.
Implementation
NodeValidatorBuilder.common() { allowHtml5(); allowTemplating(); }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-html/NodeValidatorBuilder/NodeValidatorBuilder.common.html