lib/onebox/engine/pastebin_onebox.rb in onebox-1.7.5 vs lib/onebox/engine/pastebin_onebox.rb in onebox-1.7.6

- old
+ new

@@ -27,11 +27,11 @@ lines.size > MAX_LINES end def lines return @lines if @lines - response = Onebox::Helpers.fetch_response("http://pastebin.com/raw/#{paste_key}", 1) - @lines = response.body.split("\n") + response = Onebox::Helpers.fetch_response("http://pastebin.com/raw/#{paste_key}", 1) rescue "" + @lines = response.split("\n") end def paste_key if uri.path =~ /\/raw\// match = uri.path.match(/\/raw\/([^\/]+)/)