2010-01-23 10 views

Répondre

3
require 'CGI' 

get '/html' do 
    erb :view 
end 

def h(html) 
    CGI.escapeHTML html 
end 

__END__ 
@@view 
    <% File.open('my.html') do |f| %> 
    <%=h f.read() %> 
    <% end %>