module Haml::Filters::Cdata

Surrounds the filtered text with CDATA tags.

Public Instance Methods

render(text) click to toggle source

@see Haml::Filters::Base#render

# File lib/haml/filters.rb, line 258
def render(text)
  "<![CDATA[#{("\n" + text).rstrip.gsub("\n", "\n    ")}\n]]>"
end