diff --git a/app/models/letter_opener_web/letter.rb b/app/models/letter_opener_web/letter.rb index 49e19a1..068cebf 100644 --- a/app/models/letter_opener_web/letter.rb +++ b/app/models/letter_opener_web/letter.rb @@ -69,7 +69,7 @@ def adjust_link_targets(contents) # "complete" (as in they have the whole structure) and letter_opener # prepends some information about the mail being sent, making REXML # complain about it - contents.scan(/]+>(?:.|\s)*?<\/a>/).each do |link| + contents.scan(/]+>(?:.|\s)*?<\/a>/).each do |link| fixed_link = fix_link_html(link) xml = REXML::Document.new(fixed_link).root unless xml.attributes['href'] =~ /(plain|rich).html/