Project

General

Profile

Defect #13284 ยป b9a0aa7ee24364a2fe025f9482fcff969b2a133d.patch

Alex Shulgin, 2013-02-25 22:37

View differences:

app/models/mail_handler.rb
386 386
    @plain_text_body = Redmine::CodesetUtil.to_utf8(part.body.decoded, part.charset)
387 387

  
388 388
    # strip html tags and remove doctype directive
389
    @plain_text_body = strip_tags(@plain_text_body.strip)
390
    @plain_text_body.sub! %r{^<!DOCTYPE .*$}, ''
389
    if part.mime_type == 'text/html'
390
      @plain_text_body = strip_tags(@plain_text_body.strip)
391
      @plain_text_body.sub! %r{^<!DOCTYPE .*$}, ''
392
    end
393

  
391 394
    @plain_text_body
392 395
  end
393 396

  
    (1-1/1)