Patch #12937 ยป mail_handler.patch
mail_handler.rb 2013-01-21 21:08:16.000000000 +0200 | ||
---|---|---|
332 | 332 |
# * parse the email To field |
333 | 333 |
# * specific project (eg. Setting.mail_handler_target_project) |
334 | 334 |
target = Project.find_by_identifier(get_keyword(:project)) |
335 |
if target.nil? |
|
336 |
target = Project.find_by_identifier(@@handler_options[:issue][:project]) |
|
337 |
end |
|
335 | 338 |
raise MissingInformation.new('Unable to determine target project') if target.nil? |
336 | 339 |
target |
337 | 340 |
end |
... | ... | |
379 | 382 |
part = email.text_part || email.html_part || email |
380 | 383 |
@plain_text_body = Redmine::CodesetUtil.to_utf8(part.body.decoded, part.charset) |
381 | 384 | |
385 |
# preserve outlook <user@domain> style addresses, not really tags |
|
386 |
@plain_text_body.sub! %r{<([^>'" @]+@[^>'" @]+)>}, '<\1>' |
|
387 |
|
|
382 | 388 |
# strip html tags and remove doctype directive |
383 | 389 |
@plain_text_body = strip_tags(@plain_text_body.strip) |
384 | 390 |
@plain_text_body.sub! %r{^<!DOCTYPE .*$}, '' |