aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugins/octopress_filters.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb
index 7eaaaa7c..ef8c1fb2 100644
--- a/plugins/octopress_filters.rb
+++ b/plugins/octopress_filters.rb
@@ -63,6 +63,11 @@ module OctopressLiquidFilters
return (content.nil?) ? input : content
end
+ # Escapes CDATA sections in post content
+ def cdata_escape(input)
+ input.gsub(/<!\[CDATA\[/, '&lt;![CDATA[').gsub(/\]\]>/, ']]&gt;')
+ end
+
# Replaces relative urls with full urls
def expand_urls(input, url='')
url ||= '/'