lib/hanami/utils/escape.rb in hanami-utils-1.3.5 vs lib/hanami/utils/escape.rb in hanami-utils-1.3.6

- old
+ new

@@ -395,11 +395,11 @@ def encode(*args) self.class.new super end end - # Escape HTML contents + # Escapes HTML contents # # This MUST be used only for tag contents. # Please use `html_attribute` for escaping HTML attributes. # # @param input [String] the input @@ -428,11 +428,11 @@ end result end - # Escape HTML attributes + # Escapes HTML attributes # # This can be used both for HTML attributes and contents. # Please note that this is more computational expensive. # If you need to escape only HTML contents, please use `.html`. # @@ -461,11 +461,11 @@ end result end - # Escape URL for HTML attributes (href, src, etc..). + # Escapes URL for HTML attributes (href, src, etc..). # # It extracts from the given input the first valid URL that matches the # whitelisted schemes (default: http, https and mailto). # # It's possible to pass a second optional argument to specify different @@ -519,10 +519,10 @@ end class << self private - # Encode the given string into UTF-8 + # Encodes the given string into UTF-8 # # @param input [String] the input # # @return [String] an UTF-8 encoded string #