Skip to content

Commit

Permalink
Treat the body as UTF-8 for user_preferences#update
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed May 16, 2024
1 parent 334c856 commit 64af281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/user_preferences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def update
pref.k = params[:preference_key]
end

pref.v = request.raw_post.chomp
pref.v = request.raw_post.chomp.force_encoding("UTF-8")
pref.save!

render :plain => ""
Expand Down

0 comments on commit 64af281

Please sign in to comment.