Skip to content

Commit

Permalink
Merge pull request #19938 from code-dot-org/strip-emoji
Browse files Browse the repository at this point in the history
strip emoji from application notes field
  • Loading branch information
Hamms committed Jan 11, 2018
2 parents b669eaf + 5e79b18 commit 1bbc4aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def update
end
application_data["regional_partner_id"] = application_data.delete "regional_partner_filter"

application_data["notes"] = application_data["notes"].strip_utf8mb4 if application_data["notes"]

@application.update!(application_data)

# only allow those with full management permission to lock or unlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ class ApplicationsControllerTest < ::ActionController::TestCase
refute data['locked']
end

test 'notes field will strip pandas' do
sign_in @workshop_organizer
put :update, params: {id: @csf_facilitator_application_with_partner, application: {notes: panda_panda}}
assert_response :success
data = JSON.parse(response.body)
assert_equal data['notes'], "Panda"
end

test 'csv download for csd teacher returns expected columns' do
sign_in @workshop_admin

Expand Down

0 comments on commit 1bbc4aa

Please sign in to comment.