Class: Tiny::SafeString

Inherits:
String
  • Object
show all
Defined in:
lib/tiny/safe_string.rb

Overview

A SafeString will not be HTML-escaped when appended to Tag or Widget content, whereas a String will be.

See Also:

Instance Method Summary collapse

Methods inherited from String

#append=, #append_escaped=

Instance Method Details

#concat(string) ⇒ Object



11
12
13
14
# File 'lib/tiny/safe_string.rb', line 11

def concat(string)
  return super unless String === string
  super Helpers.sanitize string
end

#html_safe?Boolean

Returns:

  • (Boolean)


9
# File 'lib/tiny/safe_string.rb', line 9

def html_safe?; true end