mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 02:46:13 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user