Skip to content

Commit

Permalink
change link regex to look for space. Avoids matching <address> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
davekaro committed Mar 5, 2014
1 parent 6bd44a6 commit dbe6a2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/letter_opener_web/letter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def adjust_link_targets(contents)
# "complete" (as in they have the whole <html> structure) and letter_opener
# prepends some information about the mail being sent, making REXML
# complain about it
contents.scan(/<a[^>]+>(?:.|\s)*?<\/a>/).each do |link|
contents.scan(/<a\s[^>]+>(?:.|\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/
Expand Down

0 comments on commit dbe6a2f

Please sign in to comment.