diff --git a/src/formatters/html.cr b/src/formatters/html.cr
index 1c8a245..715d793 100644
--- a/src/formatters/html.cr
+++ b/src/formatters/html.cr
@@ -1,5 +1,6 @@
require "../constants/token_abbrevs.cr"
require "../formatter"
+require "html"
module Tartrazine
class Html < Formatter
@@ -67,7 +68,7 @@ module Tartrazine
line_id = linkable_line_numbers? ? "id=\"#{line_number_id_prefix}#{i + 1}\"" : ""
outp << "#{line_label} "
line.each do |token|
- fragment = "#{token[:value]}"
+ fragment = "#{HTML.escape(token[:value])}"
outp << fragment
end
end