diff --git a/app/models/letter_opener_web/letter.rb b/app/models/letter_opener_web/letter.rb
index 3789d68..8bc8de2 100644
--- a/app/models/letter_opener_web/letter.rb
+++ b/app/models/letter_opener_web/letter.rb
@@ -73,7 +73,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/