Fixed JSON escaping of filters (#11929).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10465 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-09-25 18:23:11 +00:00
parent 18d1c62ca8
commit 917a89fbf7
4 changed files with 24 additions and 11 deletions

View File

@@ -273,4 +273,12 @@ class QueriesControllerTest < ActionController::TestCase
assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook', :set_filter => 1, :query_id => nil
assert_nil Query.find_by_id(1)
end
def test_backslash_should_be_escaped_in_filters
@request.session[:user_id] = 2
get :new, :subject => 'foo/bar'
assert_response :success
assert_template 'new'
assert_include 'addFilter("subject", "=", ["foo\/bar"]);', response.body
end
end