Escaping in Ruby

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article
Posted by John
on Saturday, 08 November 2008

Really simple example for escaping your strings

require 'uri'
str = URI.escape(str) if str.length > 0