Escaping single quotes in ruby is the same mess as in java:
puts ":'(".gsub('\'', '\\\\\'') |
I needed this to make the smilies after my comment box (here) clickable.
Shortly after that, i found escape_javascript, maybe it still comes in handy.
August 22, 2007 by Michael
Escaping single quotes in ruby is the same mess as in java:
puts ":'(".gsub('\'', '\\\\\'') |
puts ":'(".gsub('\'', '\\\\\'')
I needed this to make the smilies after my comment box (here) clickable.
Shortly after that, i found escape_javascript, maybe it still comes in handy.
No comments yet
Post a Comment