プロジェクト

全般

プロフィール

Vote #73337

未完了

mail_handler.rb - email message body has trailing space - alters wiki view

Admin Redmine さんがほぼ4年前に追加. ほぼ4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
0
issue_org_id:
13135
author_id:
69886
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
66
ステータス-->[New]

説明

Redmine 2.2.2, Ruby 1.8.7, Rails 3.2.11 on EL6

app/models/mail_handler.rb, line 475:

body.strip

This leaves a trailing space on all lines of the body of the email:

Testing, Testing


 2 new lines...  Still testing
 -- 
 *Me*
 Office: (555) 555-1212
 Email: me@example.net

Which looks like:

Testing, Testing

2 new lines... Still testing
--
Me
Office: (555) 555-1212
Email: me@example.net

Possible fix - remove trailing space by:


#body.strip
newbody = ""
body.each {|l| newbody << l.gsub(/^[ ]/, '')}
body = newbody

journals

Possible fix - remove LEADING space by:

<pre><code class="ruby">
#body.strip
newbody = ""
body.each {|l| newbody << l.gsub(/^[ ]/, '')}
body = newbody
</code></pre>
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ4年前に更新

  • カテゴリEmail receiving_29 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0