<% if item.content %>
<%= sanitize( item.content ) %>
<%
doc = Nokogiri::HTML(item.content)
src = doc.css("img").attribute('src').to_s
%>
<% if src.include? "http:" %>
<% src.sub!(/http:/,'https:') %>
<% end %>
<% if src.nil? %>
<% elsif src.include? "stat?event=post.clientViewed" %>
<% elsif src.include? "profile.jpg" %>
<% else %>
<div class="photo">
<%= image_tag("#{ src }") %>
</div>
<% end %>
<% elsif item.summary %>
<%= sanitize( item.summary ) %>
<%
doc = Nokogiri::HTML(item.summary)
src = doc.css("img").attribute('src').to_s
%>
<% if src.include? "http:" %>
<% src.sub!(/http:/,'https:') %>
<% end %>
<% if src.nil? %>
<% elsif src.include? "stat?event=post.clientViewed" %>
<% elsif src.include? "profile.jpg" %>
<% else %>
<div class="photo">
<%= image_tag("#{ src }") %>
</div>
<% end %>
<% else %>
-/-
<% end %>