diff options
Diffstat (limited to '')
-rw-r--r-- | plugins/octopress_filters.rb | 5 |
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\[/, '<![CDATA[').gsub(/\]\]>/, ']]>') + end + # Replaces relative urls with full urls def expand_urls(input, url='') url ||= '/' |