diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 43bc410..fb2d59f 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -19,7 +19,7 @@ class ProfileController < PublicController def tag @tag = params[:id] - @tag_cache_key = "tag_#{@tag.to_s.gsub(' ', '%20')}_#{profile.id.to_s}_page_#{params[:npage]}" + @tag_cache_key = "tag_#{CGI.escape(@tag.to_s)}_#{profile.id.to_s}_page_#{params[:npage]}" if is_cache_expired?(@tag_cache_key, true) @tagged = profile.find_tagged_with(@tag).paginate(:per_page => 20, :page => params[:npage]) end diff --git a/app/controllers/public/search_controller.rb b/app/controllers/public/search_controller.rb index 000c79d..6176344 100644 --- a/app/controllers/public/search_controller.rb +++ b/app/controllers/public/search_controller.rb @@ -230,7 +230,7 @@ class SearchController < PublicController def tag @tag = environment.tags.find_by_name(params[:tag]) - @tag_cache_key = "tag_#{@tag.to_s.gsub(' ', '%20')}_env_#{environment.id.to_s}_page_#{params[:npage]}" + @tag_cache_key = "tag_#{CGI.escape(@tag.to_s)}_env_#{environment.id.to_s}_page_#{params[:npage]}" if is_cache_expired?(@tag_cache_key, true) @tagged = environment.articles.find_tagged_with(@tag).paginate(:per_page => 10, :page => params[:npage]) end -- libgit2 0.21.2