Programming Tutorials

escapeHTML() in Ruby

By: Jeeva in Ruby Tutorials on 2009-03-03  

escapeHTML(string)

Escape special characters in HTML, namely &\"<>

  CGI::escapeHTML('Usage: foo "bar" <baz>')
     # => "Usage: foo &quot;bar&quot; &lt;baz&gt;"





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Ruby )

Latest Articles (in Ruby)