diff --git a/app/models/comment.rb b/app/models/comment.rb index d7c0a68270..29d6320980 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -319,8 +319,12 @@ def self.get_domain(email) email[/(?<=@)[^.]+(?=\.)/, 0] end + def self.yahoo_quote_present?(mail_doc) + mail_doc.css(".yahoo_quoted").any? + end + def self.yahoo_parsed_mail(mail_doc) - if mail_doc.css(".yahoo_quoted") + if yahoo_quote_present?(mail_doc) extra_content = mail_doc.css(".yahoo_quoted")[0] mail_doc.css(".yahoo_quoted")[0].remove comment_content = mail_doc