From cb1b73da7e601be46bfc0fa98415bbdd334d757a Mon Sep 17 00:00:00 2001 From: Kuba Suder Date: Mon, 1 Apr 2024 13:11:00 +0200 Subject: [PATCH] fixed images failing if they have non-ascii chars in alt --- app/mastodon_api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mastodon_api.rb b/app/mastodon_api.rb index e44ee9a..f76f8fb 100644 --- a/app/mastodon_api.rb +++ b/app/mastodon_api.rb @@ -71,7 +71,7 @@ class MastodonAPI form_data = [ ['file', data, { :filename => filename, :content_type => content_type }], - ['description', alt.to_s] + ['description', alt.to_s.force_encoding('ASCII-8BIT')] ] request = Net::HTTP::Post.new(url, headers) -- 2.51.2