diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-27 13:40:47 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-27 13:40:47 +0000 |
commit | 278b27a1a90033863e318e07f6339947d77c3de2 (patch) | |
tree | 2b7aa7d726990ae9e2b0d2235e29085795abc4df | |
parent | df366d97dbff85a62bbe156a09db8dafdbe1c852 (diff) |
* sample/rss/tdiary_plugin/rss-recent.rb: supported Hiki.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sample/rss/tdiary_plugin/rss-recent.rb | 6 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Sun Jun 27 22:39:51 2004 Kouhei Sutou <kou@cozmixng.org> + + * sample/rss/tdiary_plugin/rss-recent.rb: supported Hiki. + Sun Jun 27 12:19:46 2004 Kouhei Sutou <kou@cozmixng.org> * {lib,sample,test}/rss: added RSS Parser. [ruby-dev:23780] diff --git a/sample/rss/tdiary_plugin/rss-recent.rb b/sample/rss/tdiary_plugin/rss-recent.rb index 8ba8ed0b52..090a779092 100644 --- a/sample/rss/tdiary_plugin/rss-recent.rb +++ b/sample/rss/tdiary_plugin/rss-recent.rb @@ -15,13 +15,15 @@ require "rss/rss" RSS_RECENT_FIELD_SEPARATOR = "\0" RSS_RECENT_ENTRY_SEPARATOR = "\1" -RSS_RECENT_VERSION = "0.0.4" +RSS_RECENT_VERSION = "0.0.5" RSS_RECENT_HTTP_HEADER = { "User-Agent" => "tDiary RSS recent plugin version #{RSS_RECENT_VERSION}. " << "Using RSS parser version is #{::RSS::VERSION}.", } def rss_recent(url, max=5, cache_time=3600) + url.untaint + cache_file = "#{@cache_path}/rss-recent.#{CGI.escape(url)}" rss_recent_cache_rss(url, cache_file, cache_time.to_i) @@ -86,7 +88,7 @@ def rss_recent_cache_rss(url, cache_file, cache_time) # pre processing begin - rss.output_encoding = charset + rss.output_encoding = @conf.charset || charset rescue ::RSS::UnknownConversionMethodError end |