method
html_escape
html_escape(s)
public
Takes a string s with some HTML in it, and escapes ‘&’, ‘“’, ‘<’ and ‘>’, by replacing them with the appropriate entities.
This method is also aliased to h, for convenience.
Examples:
require 'rss/utils' RSS::Utils.html_escape("Dungeons & Dragons") # => "Dungeons & Dragons" RSS::Utils.h(">_>") # => ">_>"