mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-18 06:58:17 +00:00
Ruby 3.2: Changeset.normalize_comments raises Encoding::CompatibilityError if the string contains an invalid UTF-8 byte sequence (#38099, #38100).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22000 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cec30f9a05
commit
f186e614ee
@ -296,7 +296,7 @@ class Changeset < ActiveRecord::Base
|
|||||||
class << self
|
class << self
|
||||||
# Strips and reencodes a commit log before insertion into the database
|
# Strips and reencodes a commit log before insertion into the database
|
||||||
def normalize_comments(str, encoding)
|
def normalize_comments(str, encoding)
|
||||||
Changeset.to_utf8(str.to_s.strip, encoding)
|
Changeset.to_utf8(str.to_s, encoding).strip
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_utf8(str, encoding)
|
def to_utf8(str, encoding)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user