Class: DataMapper::Property::Legacy::HTMLText
- Inherits:
-
Text
- Object
- Text
- DataMapper::Property::Legacy::HTMLText
- Defined in:
- lib/dm-core/property/legacy/html_text.rb
Instance Method Summary collapse
-
#dump(value) ⇒ String?
HTML escapes data.
-
#load(value) ⇒ String?
Unescaped HTML escaped data.
Instance Method Details
#dump(value) ⇒ String?
HTML escapes data.
32 33 34 |
# File 'lib/dm-core/property/legacy/html_text.rb', line 32 def dump(value) CGI.escape_html(value) unless value.nil? end |
#load(value) ⇒ String?
Unescaped HTML escaped data.
19 20 21 |
# File 'lib/dm-core/property/legacy/html_text.rb', line 19 def load(value) CGI.unescape_html(value) unless value.nil? end |