App: [HOLD for payment 2022-10-10][$500] Markdown for hyperlinks doesn't work with email addresses - Reported by Karim mostafa

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

1- Go to chat box 2- type an email address using markdown for a hyperlink: eg [abc@gmail.com](abc@gmail.com) 3- observe the result.

Expected Result:

One link should appear

Actual Result:

Two links appear instead of one.

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.88-10 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/43995119/186325123-128ca12c-4e06-45c7-9945-2ffc272a5c1d.mp4

https://user-images.githubusercontent.com/43995119/186325125-3a5f92d1-9ac8-41c1-8262-28b449acdee3.mp4

https://user-images.githubusercontent.com/43995119/186325127-4fd0a764-3ebf-45f1-8fb7-7af91145d4a8.mp4

Expensify/Expensify Issue URL: Issue reported by: @Karim-30 Karim mostafa Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1659954984294019

View all open jobs on GitHub

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 47 (33 by maintainers)

Most upvoted comments

👋 Happy to take care of this while Lauren is out.

Can we confirm these are the correct payments?

$500 - @aimane-chnaif for the fix $500 - @mananjadhav for C+ $250 - @Karim-30 for reporting the issue

@aimane-chnaif @mananjadhav @Karim-30 I’ve invited you to job on Upwork

Was deployed on 2022-10-03, so updated it to 2022-10-10

@aimane-chnaif reviewing this issue it seems we were due to double this job to $500 before you were assigned, but that got lost in the shuffle. This job is now $500 👍

I think skipping the text. Looks like github markdown does the same

Input Markdown:

Hi, [](email@gmail.com) is my email
Hi, [ this](email@gmail.com) is my email
Hi, [           this](email@gmail.com) is my email
Hi, [ this                ](email@gmail.com) is my email

Output:

Screenshot 2022-09-05 at 9 51 49 AM

@Karim-30 - paid! Just waiting on @aimane-chnaif now and we can close this out.

I’ll discuss with my team and get back to you

I think we’ll need to manually edit the title to hold for payment until regression period. cc @laurenreidexpensify

Looks like expensify-common is updated with another latest merge commit and this improvement is now live on staging.

Looks good to me! Thanks for updating the proposal 👍

Updated proposal:

current line:

regex: /\[([\w\\s\\d!?&#;]+)\]\(([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z]+?(\.[a-zA-Z]+)+)\)/gim,

updated line:

regex: /\[(.*)\]\(([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z]+?(\.[a-zA-Z]+)+)\)/gim,

current line:

replacement: '<a href="mailto:$2">$1</a>',

updated line:

replacement: (match, g1, g2) => `<a href="mailto:${g2}">${g1.trim()}</a>`,

This looks exactly same as github comment: markdown

@mananjadhav you got the wrong person 😅

Checking the regex.