Class: String
Overview
Amrita2 adds methods for sanitize support to Object and String. Every added method name has prefix like amrita_xxxxx
Direct Known Subclasses
Instance Method Summary collapse
-
#amrita_sanitize ⇒ Object
sanitize self before insertion to HTML document text.
-
#amrita_sanitize_as_attribute ⇒ Object
sanitize self before insertion to HTML tag attribute.
-
#amrita_sanitize_as_url ⇒ Object
sanitize self before insertion to HTML tag attribute for URL.
Instance Method Details
#amrita_sanitize ⇒ Object
sanitize self before insertion to HTML document text
35 36 37 |
# File 'lib/amrita2/core.rb', line 35 def amrita_sanitize Amrita2::Sanitizer::sanitize_text(self) end |
#amrita_sanitize_as_attribute ⇒ Object
sanitize self before insertion to HTML tag attribute
40 41 42 |
# File 'lib/amrita2/core.rb', line 40 def amrita_sanitize_as_attribute Amrita2::Sanitizer::sanitize_attribute_value(self) end |
#amrita_sanitize_as_url ⇒ Object
sanitize self before insertion to HTML tag attribute for URL
45 46 47 |
# File 'lib/amrita2/core.rb', line 45 def amrita_sanitize_as_url Amrita2::Sanitizer::sanitize_url(self) end |