mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-22 09:34:51 +00:00
Use built-in method instead.
Squashed commit of the following:
commit f7887aeda7
Author: Milly <milly.ca@gmail.com>
Date: Fri Jun 23 09:26:58 2017 +0900
Replace "&", "<", ">" to HTML entities in Markdown.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using QuickLook.Plugin.HtmlViewer;
|
||||
@@ -84,6 +85,8 @@ namespace QuickLook.Plugin.MarkdownViewer
|
||||
private string GenerateMarkdownHtml(string path)
|
||||
{
|
||||
var md = File.ReadAllText(path);
|
||||
md = WebUtility.HtmlEncode(md);
|
||||
|
||||
var html = Resources.md2html.Replace("{{content}}", md);
|
||||
|
||||
return html;
|
||||
|
Reference in New Issue
Block a user