Skip to content
Browse files

Escaping '<'

  • Loading branch information...
1 parent 86f07cf commit 5b2576c03de3e6249f925604afc1da6ec99bba7f @bobes bobes committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/ansi2html/main.rb
View
2 lib/ansi2html/main.rb
@@ -64,7 +64,7 @@ def initialize(ansi, out, envelope=false, black=false)
</head>
<body><pre><code>}
end
- s = StringScanner.new(ansi)
+ s = StringScanner.new(ansi.gsub("<", "&lt;"))
while(!s.eos?)
if s.scan(/\e\[(3[0-7]|90|1)m/)
out.print(%{<span class="#{COLOR[s[1]]}">})

0 comments on commit 5b2576c

Please sign in to comment.
Something went wrong with that request. Please try again.