Platinum Partner

Escape Single Quotes In Ruby Strings


class String
  def escape_single_quotes
    self.gsub(/[']/, '\\\\\'')
  end
end


Useful if you ever get the idea of shoving Ruby strings into JavaScript code.
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}