Methods
#
C
E
H
I
N
O
S
T
Classes and Modules
Constants
UNSAFE_STRING_METHODS = ["capitalize", "chomp", "chop", "delete", "downcase", "gsub", "lstrip", "next", "reverse", "rstrip", "slice", "squeeze", "strip", "sub", "succ", "swapcase", "tr", "tr_s", "upcase", "prepend"].freeze
Class Public methods
new(*)
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 118
118:     def initialize(*)
119:       @html_safe = true
120:       super
121:     end
Instance Public methods
+(other)
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 141
141:     def +(other)
142:       dup.concat(other)
143:     end
<<(value)

Alias for concat

[](*args)
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 101
101:     def [](*args)
102:       return super if args.size < 2
103: 
104:       if html_safe?
105:         new_safe_buffer = super
106:         new_safe_buffer.instance_eval { @html_safe = true }
107:         new_safe_buffer
108:       else
109:         to_str[*args]
110:       end
111:     end
clone_empty()
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 128
128:     def clone_empty
129:       self[0, 0]
130:     end
concat(value)
This method is also aliased as original_concat <<
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 132
132:     def concat(value)
133:       if !html_safe? || value.html_safe?
134:         super(value)
135:       else
136:         super(ERB::Util.h(value))
137:       end
138:     end
encode_with(coder)
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 157
157:     def encode_with(coder)
158:       coder.represent_scalar nil, to_str
159:     end
html_safe?()
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 145
145:     def html_safe?
146:       defined?(@html_safe) && @html_safe
147:     end
initialize_copy(other)
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 123
123:     def initialize_copy(other)
124:       super
125:       @html_safe = other.html_safe?
126:     end
original_concat(value)

Alias for concat

safe_concat(value)
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 113
113:     def safe_concat(value)
114:       raise SafeConcatError unless html_safe?
115:       original_concat(value)
116:     end
to_param()
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 153
153:     def to_param
154:       to_str
155:     end
to_s()
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 149
149:     def to_s
150:       self
151:     end
to_yaml(*args)
     # File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 161
161:     def to_yaml(*args)
162:       return super() if defined?(YAML::ENGINE) && !YAML::ENGINE.syck?
163:       to_str.to_yaml(*args)
164:     end