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 comment mentions to avoid html tags #5865

Merged
merged 2 commits into from
Jul 24, 2018

Conversation

shreyashah115
Copy link
Contributor

@shreyashah115 shreyashah115 commented Jul 24, 2018

Apparently, if a comment mention email is something like @example@ss-india.com, it gets interpreted as @example@ss<a href="http://-india.com">-india.com and fails in the email queue. So added a regex function to replace html tags before extracting.

@@ -260,6 +260,8 @@ def test_password_strength(self):
def test_comment_mentions(self):
user_name = "@test.comment@example.com"
self.assertEqual(extract_mentions(user_name)[0], "test.comment@example.com")
user_name = "@test.comment@test-example.com"
Copy link
Member

Choose a reason for hiding this comment

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

write a test case that tests your condition (i.e with HTML tags)

@rmehta rmehta merged commit b2fbb35 into frappe:hotfix Jul 24, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants