fixed encoding for forms

This commit is contained in:
Yessiest 2024-06-19 16:45:45 +04:00
parent f357440898
commit c7a4bad088
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ module Landline
# Decode charset parameter # Decode charset parameter
def decode(data) def decode(data)
data = Landline::Util.unescape_html(data) data = Landline::Util.unescape_html(data)
return data unless self.headers['charset'] return data.force_encoding("UTF-8") unless self.headers['charset']
data.force_encoding(self.headers['charset']).encode("UTF-8") data.force_encoding(self.headers['charset']).encode("UTF-8")
end end