vendor/bundle/ruby/2.1.0/gems/org-ruby-0.9.12/lib/org-ruby/html_output_buffer.rb
def escape_string! str
      str.gsub!(/&/, "&amp;")
      # Escapes the left and right angular brackets but construction
      # @@html:<text>@@ which is formatted to <text>
      str.gsub! /<([^<>\n]*)/ do |match|
        ($`[-7..-1] == "@@html:" and $'[0..2] == ">@@") ? $& : "&lt;#{$1}"
      end
      str.gsub! /([^<>\n]*)>/ do |match|
        $`[-8..-1] == "@@html:<" ? $& : "#{$1}&gt;"
      end
      str.gsub! /@@html:(<[^<>\n]*>)@@/, "\\1"
    end
# Escapes any HTML content in string
Escapes any HTML content in string
Escapes any HTML content in string
def escape_string! str
      str.gsub!(/&/, "&amp;")
      str.gsub! /<([^<>\n]*)/ do |match|
        ($`[-7..-1] == "@@html:" and $'[0..2] == ">@@") ? $& : "&lt;#{$1}"
      end
      str.gsub! /([^<>\n]*)>/ do |match|
        $`[-8..-1] == "@@html:<" ? $& : "#{$1}&gt;"
      end
      str.gsub! /@@html:(<[^<>\n]*>)@@/, "\\1"
    end
def escape_string! str str . gsub! ( / & / , "&amp;" ) str . gsub! / <([^<> \n ]*) / do | match | ( $` [ - 7 .. - 1 ] == "@@html:" and $' [ 0 .. 2 ] == ">@@" ) ? $& : "&lt;#{$1}" end str . gsub! / ([^<> \n ]*)> / do | match | $` [ - 8 .. - 1 ] == "@@html:<" ? $& : "#{$1}&gt;" end str . gsub! / @@html:(<[^<> \n ]*>)@@ / , "\\1" end
Escapes any HTML content in string
Escapes any HTML content in string
# Escapes the left and right angular brackets but construction # @@html:<text>@@ which is formatted to <text>
str