blob: a6d52de8ac115bebf6e6bc8f85789f524c3c05b9 [file] [log] [blame]
library markdown.util;
/// Replaces `<`, `&`, and `>`, with their HTML entity equivalents.
String escapeHtml(String html) {
return html.replaceAll('&', '&amp;')
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;');
}