Skip to content

Commit

Permalink
同一ホストへのURIが本文にあった場合、画像チェックをしない。 #93
Browse files Browse the repository at this point in the history
  • Loading branch information
Echos committed Oct 4, 2012
1 parent b1ad5db commit 34be819
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ def update_statement(request)

# body内の画像
re = URI.regexp(['http', 'https'])
request_uri = URI.parse(request.url)
self[:body].scan(re) do
uri = URI.parse($&)
next if uri.host == request_uri.host
response = nil
begin
nethttp = Net::HTTP.new( uri.host, uri.port )
Expand Down

0 comments on commit 34be819

Please sign in to comment.