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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 1081973003: appendHtml and insertAdjacentHtml should be consistently sanitized (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More co19 suppression fixing 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 | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 62bf3eeb517b617d84905b6ba35dd0217b821e44..8f2d3abe587dbdc8da8a5c609f67510604ff9b78 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -9412,8 +9412,10 @@ class DocumentFragment extends Node implements ParentNode {
* Parses the specified text as HTML and adds the resulting node after the
* last child of this document fragment.
*/
- void appendHtml(String text) {
- this.append(new DocumentFragment.html(text));
+ void appendHtml(String text, {NodeValidator validator,
+ NodeTreeSanitizer, treeSanitizer}) {
+ this.append(new DocumentFragment.html(text, validator: validator,
+ treeSanitizer: treeSanitizer));
}
/**
@@ -12255,8 +12257,10 @@ abstract class Element extends Node implements GlobalEventHandlers, ParentNode,
* Parses the specified text as HTML and adds the resulting node after the
* last child of this element.
*/
- void appendHtml(String text) {
- this.insertAdjacentHtml('beforeend', text);
+ void appendHtml(String text, {NodeValidator validator,
+ NodeTreeSanitizer treeSanitizer}) {
+ this.insertAdjacentHtml('beforeend', text, validator: validator,
+ treeSanitizer: treeSanitizer);
}
/**
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698