Use HTML.escape to escape XML

This commit is contained in:
Alex Ling
2020-07-01 13:27:30 +00:00
parent f5cdf8b7b6
commit 1725f42698
3 changed files with 4 additions and 14 deletions
-10
View File
@@ -153,16 +153,6 @@ def ctime(file_path : String) : Time
{% end %}
end
def escape_xml(str)
str.gsub({
'>' => ">",
'<' => "&lt;",
'"' => "&quot;",
'\'' => "&apos;",
'&' => "&amp;",
})
end
def register_mime_types
{
".zip" => "application/zip",