Replace "&", "<", ">" to HTML entities in Markdown.

This commit is contained in:
Milly
2017-06-23 09:26:58 +09:00
parent a0712e4727
commit f7887aeda7

View File

@@ -84,6 +84,9 @@ namespace QuickLook.Plugin.MarkdownViewer
private string GenerateMarkdownHtml(string path)
{
var md = File.ReadAllText(path);
md = md.Replace("&", "&amp;")
.Replace("<", "&lt;")
.Replace(">", "&gt;");
var html = Resources.md2html.Replace("{{content}}", md);
return html;