From bf9b90a908235c9d0ce0c0466e3808619803bad8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 Jul 2005 06:21:13 +0000 Subject: Adds the ability to include XML CDATA tags using Builder #1563 [Josh Knowles] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/vendor/builder/xmlmarkup.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/vendor/builder/xmlmarkup.rb b/actionpack/lib/action_view/vendor/builder/xmlmarkup.rb index 4f82704c20..b7e3b2d009 100644 --- a/actionpack/lib/action_view/vendor/builder/xmlmarkup.rb +++ b/actionpack/lib/action_view/vendor/builder/xmlmarkup.rb @@ -239,6 +239,17 @@ module Builder [:version, :encoding, :standalone]) end + # Surrounds the given text with a CDATA tag + # + # For example: + # + # xml.cdata! "blah blah blah" + # # => + def cdata!(text) + _ensure_no_block block_given? + _special("", text, nil) + end + private # NOTE: All private methods of a builder object are prefixed when -- cgit v1.2.3