diff --git a/app/views/users/public.atom.builder b/app/views/users/public.atom.builder index 4923e02da..af5dfee72 100644 --- a/app/views/users/public.atom.builder +++ b/app/views/users/public.atom.builder @@ -32,7 +32,7 @@ atom_feed({'xmlns:thr' => 'http://purl.org/syndication/thread/1.0', :id => "#{@user.person.url}p/#{post.id}" do |entry| entry.title truncate(post.formatted_message(:plain_text => true), :length => 50) - entry.content post.formatted_message(:plain_text => true), :type => 'html' + entry.content auto_link(post.formatted_message(:plain_text => true)), :type => 'html' entry.tag! 'activity:verb', 'http://activitystrea.ms/schema/1.0/post' entry.tag! 'activity:object-type', 'http://activitystrea.ms/schema/1.0/note' end diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 1911ab109..65a0ec1fd 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -45,6 +45,16 @@ describe UsersController do get :public, :username => @user.username, :format => :atom response.body.should include(sm.text) end + + it 'renders xml if atom is requested with clickalbe urls' do + sm = Factory(:status_message, :public => true, :author => @user.person) + @user.person.posts.each do |p| + p.text = "Goto http://diasporaproject.org/ now!" + p.save + end + get :public, :username => @user.username, :format => :atom + response.body.should include('<a href="http://diasporaproject.org/">http://diasporaproject.org/</a>') + end it 'redirects to a profile page if html is requested' do get :public, :username => @user.username