@@ -253,7 +253,7 module ApplicationHelper | |||
|
253 | 253 | def project_tree_options_for_select(projects, options = {}) |
|
254 | 254 | s = '' |
|
255 | 255 | project_tree(projects) do |project, level| |
|
256 |
name_prefix = (level > 0 ? (' ' * 2 * level + '» ') |
|
|
256 | name_prefix = (level > 0 ? (' ' * 2 * level + '» ') : '').html_safe | |
|
257 | 257 | tag_options = {:value => project.id} |
|
258 | 258 | if project == options[:selected] || (options[:selected].respond_to?(:include?) && options[:selected].include?(project)) |
|
259 | 259 | tag_options[:selected] = 'selected' |
@@ -96,6 +96,16 class WelcomeControllerTest < ActionController::TestCase | |||
|
96 | 96 | assert @controller.respond_to?(:call_hook) |
|
97 | 97 | end |
|
98 | 98 | |
|
99 | def test_project_jump_box_should_escape_names_once | |
|
100 | Project.find(1).update_attribute :name, 'Foo & Bar' | |
|
101 | @request.session[:user_id] = 2 | |
|
102 | ||
|
103 | get :index | |
|
104 | assert_select "#header select" do | |
|
105 | assert_select "option", :text => 'Foo & Bar' | |
|
106 | end | |
|
107 | end | |
|
108 | ||
|
99 | 109 | context "test_api_offset_and_limit" do |
|
100 | 110 | context "without params" do |
|
101 | 111 | should "return 0, 25" do |
General Comments 0
You need to be logged in to leave comments.
Login now