Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix visit_in_email opens the wrong link #177 #178

Merged
merged 2 commits into from
May 4, 2016
Merged

Fix visit_in_email opens the wrong link #177 #178

merged 2 commits into from
May 4, 2016

Conversation

Hirurg103
Copy link
Contributor

No description provided.

@Hirurg103
Copy link
Contributor Author

Hello, what is the status of it?

@mauro-oto mauro-oto self-assigned this May 4, 2016
@mauro-oto
Copy link
Member

@Hirurg103 it looks good to me. Thank you! 👍

@mauro-oto mauro-oto merged commit e17610a into email-spec:master May 4, 2016
# e.g. Click here in <a href="http://confirm">Click here</a>
def parse_email_for_anchor_text_link(email, link_text)
if textify_images(email.default_part_body) =~ %r{<a[^>]*href=['"]?([^'"]*)['"]?[^>]*?>[^<]*?(.*?)#{link_text}(.*?)[^<]*?</a>}
if textify_images(email.default_part_body) =~ %r{<a[^>]*#{HrefRegex}[^>]*>#{NotClosingARegex}#{link_text}#{NotClosingARegex}</a>}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hirurg103 looks good so far! could you use ruby constants for the begin and the end? I think that could clear the code up, otherwise it looks a little confusing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hirurg103 nevermind, thanks a lot for your contribution! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thank you for accepting this PR 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants