diff options
author | Frederic Hemberger <mail@frederic-hemberger.de> | 2011-10-04 19:18:40 +0200 |
---|---|---|
committer | Frederic Hemberger <mail@frederic-hemberger.de> | 2011-10-04 19:18:40 +0200 |
commit | 6315527b2f7676ae4afa1ce5cb78e11d25917f23 (patch) | |
tree | 7ac2d18d5a7071870d0dc3ca28a150fba06bc3dd /plugins | |
parent | 30af4db1cb579aa37f66f44887789062c92d0531 (diff) | |
download | my_new_personal_website-6315527b2f7676ae4afa1ce5cb78e11d25917f23.tar.xz my_new_personal_website-6315527b2f7676ae4afa1ce5cb78e11d25917f23.zip |
Adds CDATA sections to atom.xml, fixes #198
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 ||= '/' |