We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 382590a commit 7a7b8e7Copy full SHA for 7a7b8e7
lib/mail/fields/unstructured_field.rb
@@ -112,7 +112,7 @@ def fold(prepend = 0) # :nodoc:
112
encoding = normalized_encoding
113
encoding_overhead = "=?#{encoding}?Q??=".length
114
# The encoded string goes here ^ (between the ??)
115
- max_safe_word = 78 - encoding_overhead - 10 # allow for encoding overhead + prefix
+ max_safe_word = 78 - encoding_overhead - prepend # allow for encoding overhead + prefix
116
decoded_string = decoded.to_s
117
words = decoded_string.split(/[ \t]/)
118
should_encode = !decoded_string.ascii_only? || words.any? {|word| word.length > max_safe_word}
0 commit comments