• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revision2539a4a51b87d2d781a1f278d53e8574c0fcf5bf (tree)
Zeit2008-12-06 00:40:00
Autorikeji <ikeji@f836...>
Commiterikeji

Log Message

Support url list in RSS::save
Support https in RSS::save

git-svn-id: http://dev.ikejima.org/src/svn/pragger/trunk@393 f8368ae4-1e99-dc11-9799-0018f35ab5fa

Ändern Zusammenfassung

Diff

--- a/plugin/RSS/save.rb
+++ b/plugin/RSS/save.rb
@@ -27,7 +27,15 @@ def save(config,data)
2727 else
2828 item = maker.items.new_item
2929 item.title = i.title rescue i.to_s
30- item.link = i.link rescue (config['link'] || "http://example.net/") + "\##{@count}"
30+ begin
31+ item.link = i.link
32+ rescue
33+ if i.to_s =~ %r|^https?://|
34+ item.link = i.to_s
35+ else
36+ item.link = (config['link'] || "http://example.net/") + "\##{@count}"
37+ end
38+ end
3139 item.description = i.description rescue i.to_s
3240 item.date = i.date rescue Time.now
3341 @count += 1