Sha256: 57eb1e4b00083597b25d85f67296effbd50f4ccd2eb0979fdcc7135bfae71e58

Contents?: true

Size: 645 Bytes

Versions: 19

Compression:

Stored size: 645 Bytes

Contents

require 'htmlentities'

#
# This file extends the String class with methods to allow encoding and decoding of
# HTML/XML entities from/to their corresponding UTF-8 codepoints.
#
class String

  #
  # Decode XML and HTML 4.01 entities in a string into their UTF-8
  # equivalents.
  #
  def decode_entities
    return HTMLEntities.decode_entities(self)
  end
  
  #
  # Encode codepoints in a string into their corresponding entities. See
  # the documentation of HTMLEntities.encode_entities for a list of possible
  # instructions.
  #
  def encode_entities(*instructions)
    return HTMLEntities.encode_entities(self, *instructions)
  end

end

Version data entries

19 entries across 19 versions & 4 rubygems

Version Path
fastreader-1.0.0 lib/htmlentities/string.rb
fastreader-1.0.1 lib/htmlentities/string.rb
fastreader-1.0.3 lib/htmlentities/string.rb
fastreader-1.0.4 lib/htmlentities/string.rb
fastreader-1.0.5 lib/htmlentities/string.rb
fastreader-1.0.2 lib/htmlentities/string.rb
fastreader-1.0.7 lib/htmlentities/string.rb
fastreader-1.0.6 lib/htmlentities/string.rb
fastreader-1.0.8 lib/htmlentities/string.rb
htmlentities-3.0.1 lib/htmlentities/string.rb
htmlentities-4.0.0 lib/htmlentities/string.rb
kindle-feeds-1.0.0 lib/htmlentities/string.rb
kindle-feeds-1.0.1 lib/htmlentities/string.rb
kindle-feeds-1.0.2 lib/htmlentities/string.rb
kindle-feeds-1.0.5 lib/htmlentities/string.rb
kindle-feeds-1.0.3 lib/htmlentities/string.rb
kindle-feeds-1.0.4 lib/htmlentities/string.rb
kindle-feeds-1.0.6 lib/htmlentities/string.rb
typo-5.3 vendor/gems/htmlentities-4.0.0/lib/htmlentities/string.rb