Ruby / Roda - Web Framework / Plugins / :h


Introduction

The :h plugin adds an #.h instance method that will HTML escape the input and return it.

The following example will return "<foo>" as the body.

plugin :h

route do |r|

  h('<foo>')
  
end

InstanceMethods

#.h(s)

HTML escape the input and return the escaped version.