method

html_escape

Importance_1
html_escape(s) public

A utility method for escaping HTML tag characters in s.

require "erb"
include ERB::Util

puts html_escape("is a > 0 & a < 10?")

Generates

is a > 0 & a < 10?
Show source
Register or log in to add new notes.