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

Unified Diff: third_party/pkg/markdown/lib/src/util.dart

Issue 189333002: pkg/docgen: update markdown to 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updates Created 6 years, 9 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 | « third_party/pkg/markdown/lib/src/markdown/inline_parser.dart ('k') | third_party/pkg/markdown/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/markdown/lib/src/util.dart
diff --git a/third_party/pkg/markdown/lib/src/util.dart b/third_party/pkg/markdown/lib/src/util.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a6d52de8ac115bebf6e6bc8f85789f524c3c05b9
--- /dev/null
+++ b/third_party/pkg/markdown/lib/src/util.dart
@@ -0,0 +1,8 @@
+library markdown.util;
+
+/// Replaces `<`, `&`, and `>`, with their HTML entity equivalents.
+String escapeHtml(String html) {
+ return html.replaceAll('&', '&amp;')
+ .replaceAll('<', '&lt;')
+ .replaceAll('>', '&gt;');
+}
« no previous file with comments | « third_party/pkg/markdown/lib/src/markdown/inline_parser.dart ('k') | third_party/pkg/markdown/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698