Skip to content

Commit

Permalink
Escaping '<'
Browse files Browse the repository at this point in the history
  • Loading branch information
bobes committed Oct 25, 2011
1 parent 86f07cf commit 5b2576c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansi2html/main.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def initialize(ansi, out, envelope=false, black=false)
</head> </head>
<body><pre><code>} <body><pre><code>}
end end
s = StringScanner.new(ansi) s = StringScanner.new(ansi.gsub("<", "&lt;"))
while(!s.eos?) while(!s.eos?)
if s.scan(/\e\[(3[0-7]|90|1)m/) if s.scan(/\e\[(3[0-7]|90|1)m/)
out.print(%{<span class="#{COLOR[s[1]]}">}) out.print(%{<span class="#{COLOR[s[1]]}">})
Expand Down

0 comments on commit 5b2576c

Please sign in to comment.