Return a copy of str with angle brackets and ampersands HTML-encoded.
# File bluecloth.rb, line 1131 def encode_html( str ) str.gsub( /&(?!#?[x]?(?:[0-9a-f]+|\w+);)/i, "&" ). gsub( %r{<(?![a-z/?\$!])}i, "<" ) end
<code/>
<pre/>
<code/>and<pre/>for code samples.