class String
Public Instance Methods
escape()
click to toggle source
# File lib/hyaslide/render_hyaslide.rb, line 6 def escape if self =~ /<a>(.*)<\/a>/ "a(#{$1})" elsif self =~ /<img>(.*)<\/img>/ "img(#{$1})" elsif self =~ /<div>(.*)<\/div>/ "div(#{$1})" elsif self =~ /<strong>(.*)<\/strong>/ "strong(nil, \"#{$1}\")" else "\"#{self.gsub(/\"/, "\\\"").gsub(/\\/, "\\\\")}\"" end end