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

Unified Diff: lib/safe_html.dart

Issue 23532024: Changes in webui to comply with the safe html changes. Now that Nodes can be (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/emitters.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/safe_html.dart
diff --git a/lib/safe_html.dart b/lib/safe_html.dart
index 33854719453ffd7c485816e85359ad11b956cbd4..a80b28a81beed854fbbf32e7b7611bbc0a5367bb 100644
--- a/lib/safe_html.dart
+++ b/lib/safe_html.dart
@@ -6,13 +6,20 @@
// dart:html?
library safe_html;
+import 'package:meta/meta.dart';
+
/** Declares a string that is a well-formed HTML fragment. */
+// TODO(sigmund): delete this type now that Element.html is safe by default.
class SafeHtml {
/** Underlying html string. */
String _html;
- // TODO(sigmund): provide a constructor that does html validation
+ /**
+ * dart:html now supports sanitizing elements. You can add any node
+ * directly in your bindings instead of creating instances of SafeHtml.
+ */
+ @deprecated
SafeHtml.unsafe(this._html);
String toString() => _html;
« no previous file with comments | « no previous file | lib/src/emitters.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698