diff --git a/app/views/profile/_create_article.html.erb b/app/views/profile/_create_article.html.erb index 00e05c6..968c6f3 100644 --- a/app/views/profile/_create_article.html.erb +++ b/app/views/profile/_create_article.html.erb @@ -9,7 +9,7 @@
<%= link_to(activity.params['name'], activity.params['url']) %>
- <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') %> <%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %> + <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') unless activity.params['lead'].blank? %> <%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %>
<%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>

<%= time_ago_as_sentence(activity.created_at) %>

diff --git a/app/views/profile/content_tagged.html.erb b/app/views/profile/content_tagged.html.erb index bde9e04..2abd6c3 100644 --- a/app/views/profile/content_tagged.html.erb +++ b/app/views/profile/content_tagged.html.erb @@ -1,6 +1,8 @@ -<% add_rss_feed_to_head(_("%s's contents tagged with \"%s\"") % [profile.name, @tag], tag_feed_path) %> +<% escaped_tag = CGI.escapeHTML(@tag) %> -

<%= _('Content tagged with "%s"') % CGI.escapeHTML(@tag) %>

+<% add_rss_feed_to_head(_("%s's contents tagged with \"%s\"") % [profile.name, escaped_tag], tag_feed_path) %> + +

<%= _('Content tagged with "%s"') % escaped_tag %>

<%= link_to image_tag('icons-mime/rss-feed.png', :alt => _('Feed for this tag'), :title => _('Feed for this tag')), tag_feed_path, :class => 'blog-feed-link'%> @@ -18,6 +20,6 @@ <%= pagination_links @tagged, :param_name => 'npage' %>

- <%= link_to _('See content tagged with "%s" in the entire site') % CGI.escapeHTML(@tag), :controller => 'search', :action => 'tag', :tag => @tag %> + <%= link_to _('See content tagged with "%s" in the entire site') % escaped_tag, :controller => 'search', :action => 'tag', :tag => @tag %>
<% end %> diff --git a/config/routes.rb b/config/routes.rb index 3f7e51d..2686f28 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -72,7 +72,7 @@ Noosfero::Application.routes.draw do # profile tags match 'profile/:profile/tags/:id', :controller => 'profile', :action => 'content_tagged', :id => /.+/, :profile => /#{Noosfero.identifier_format}/ - match 'profile/:profile/tags', :controller => 'profile', :action => 'tags', :profile => /#{Noosfero.identifier_format}/ + match 'profile/:profile/tags(/:id)', :controller => 'profile', :action => 'tags', :profile => /#{Noosfero.identifier_format}/ # profile search match 'profile/:profile/search', :controller => 'profile_search', :action => 'index', :profile => /#{Noosfero.identifier_format}/ diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index f1c8f3f..2c09d00 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -843,7 +843,7 @@ class ProfileControllerTest < ActionController::TestCase user.stubs(:login).returns('some') @controller.stubs(:current_user).returns(user) get :index, :profile => p1.identifier - assert_equal 15, assigns(:network_activities).count + assert_equal 15, assigns(:network_activities).size end should 'the network activity be visible only to logged users' do -- libgit2 0.21.2