Module: Condensation::Filters::Hyperlink
- Defined in:
- lib/condensation/filters/hyperlink.rb
Instance Method Summary collapse
Instance Method Details
#hyperlink(input, text = nil) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/condensation/filters/hyperlink.rb', line 4 def hyperlink(input, text = nil) return if input.nil? input = Sanitizer.new(input.to_s).escape_html text = text ? Sanitizer.new(text).escape_html : input "<a href='#{input}'>#{text}</a>" end |