engines/adva_cms/vendor/plugins/stringex/lib/lucky_sneaks/string_extensions.rb
def convert_misc_entities
      dummy = dup
      {
        "#822[01]" => "\"",
        "#821[67]" => "'",
        "#8230" => "...",
        "#8211" => "-",
        "#8212" => "--",
        "#215" => "x",
        "gt" => ">",
        "lt" => "<",
        "(#8482|trade)" => "(tm)",
        "(#174|reg)" => "(r)",
        "(#169|copy)" => "(c)",
        "(#38|amp)" => "and",
        "nbsp" => " ",
        "(#162|cent)" => " cent",
        "(#163|pound)" => " pound",
        "(#188|frac14)" => "one fourth",
        "(#189|frac12)" => "half",
        "(#190|frac34)" => "three fourths",
        "(#176|deg)" => " degrees"
      }.each do |textiled, normal|
        dummy.gsub!(/&#{textiled};/, normal)
      end
      dummy.gsub(/&[^;]+;/, "")
    end
# Converts HTML entities (taken from common Textile/RedCloth formattings) into plain text formats.
# 
# Note: This isn't an attempt at complete conversion of HTML entities, just those most likely
# to be generated by Textile.
Converts HTML entities (taken from common Textile/RedCloth formattings) into plain text formats.
Note: This isn't an attempt at complete conversion of HTML entities, just those most likely
to be generated by Textile.
Converts HTML entities ( taken from common Textile / RedCloth formattings ) into plain text formats . Note : This isn ' t an attempt at complete conversion of HTML entities just those most likely to be generated by Textile .
def convert_misc_entities
      dummy = dup
      {
        "#822[01]" => "\"",
        "#821[67]" => "'",
        "#8230" => "...",
        "#8211" => "-",
        "#8212" => "--",
        "#215" => "x",
        "gt" => ">",
        "lt" => "<",
        "(#8482|trade)" => "(tm)",
        "(#174|reg)" => "(r)",
        "(#169|copy)" => "(c)",
        "(#38|amp)" => "and",
        "nbsp" => " ",
        "(#162|cent)" => " cent",
        "(#163|pound)" => " pound",
        "(#188|frac14)" => "one fourth",
        "(#189|frac12)" => "half",
        "(#190|frac34)" => "three fourths",
        "(#176|deg)" => " degrees"
      }.each do |textiled, normal|
        dummy.gsub!(/&#{textiled};/, normal)
      end
      dummy.gsub(/&[^;]+;/, "")
    end
def convert_misc_entities dummy = dup { "#822[01]" => "\"" , "#821[67]" => "'" , "#8230" => "..." , "#8211" => "-" , "#8212" => "--" , "#215" => "x" , "gt" => ">" , "lt" => "<" , "(#8482|trade)" => "(tm)" , "(#174|reg)" => "(r)" , "(#169|copy)" => "(c)" , "(#38|amp)" => "and" , "nbsp" => " " , "(#162|cent)" => " cent" , "(#163|pound)" => " pound" , "(#188|frac14)" => "one fourth" , "(#189|frac12)" => "half" , "(#190|frac34)" => "three fourths" , "(#176|deg)" => " degrees" } . each do | textiled , normal | dummy . gsub! ( / & #{ textiled } ; / , normal ) end dummy . gsub ( / &[^;]+; / , "" ) end
Converts HTML entities (taken from common Textile/RedCloth formattings) into plain text formats.
Converts HTML entities ( taken from common Textile / RedCloth formattings ) into plain text formats .