Project

General

Profile

Defect #13284 ยป b9a0aa7ee24364a2fe025f9482fcff969b2a133d.patch

Alex Shulgin, 2013-02-25 22:37

View differences:

app/models/mail_handler.rb
@plain_text_body = Redmine::CodesetUtil.to_utf8(part.body.decoded, part.charset)
# strip html tags and remove doctype directive
@plain_text_body = strip_tags(@plain_text_body.strip)
@plain_text_body.sub! %r{^<!DOCTYPE .*$}, ''
if part.mime_type == 'text/html'
@plain_text_body = strip_tags(@plain_text_body.strip)
@plain_text_body.sub! %r{^<!DOCTYPE .*$}, ''
end
@plain_text_body
end
    (1-1/1)