Class: Bijou::EncodeAttributeValue
- Defined in:
- lib/bijou/filters.rb
Overview
The a
filter escapes text intended for HTML tag attribute values.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.apply(input) ⇒ Object
71 72 73 |
# File 'lib/bijou/filters.rb', line 71 def self.apply(input) input.gsub(/&/n, '&').gsub(/\"/n, '"').gsub(/\'/n, ''').gsub(/</n, '<') end |
Instance Method Details
#render(input) ⇒ Object
67 68 69 |
# File 'lib/bijou/filters.rb', line 67 def render(input) "Bijou::EncodeAttribute.apply(#{input})" end |