Skip to content

[$500] Chat - Console error and email changes to "a%20href=" for multiline email hyperlinks #43386

@lanitochka17

Description

@lanitochka17

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


Version Number:
Reproducible in staging?:
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4602126
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal team

Action Performed:

  1. Log in to New Expensify
  2. Navigate to any chat
  3. Draft a message with multiline email hyperlink
  4. Note a console error
  5. Send the message
  6. Edit the message and note email address
  7. Cancel the edit, copy the message > paste it as plain text

Expected Result:

There shouldn't be any console errors and the email address should remain the same as when drafting the message.
Just the text part of the hyperlink should be pasted when pasting as plain text

Actual Result:

Console error related to react-native-live-markdown-parser is displayed and email address of the link changes to "a%20href=".
Additionally, the URL and the text is pasted when pasting multiline hyperlinks as plain text instead of just text
ERROR MESSAGE
react-native-live-markdown-parser.js:34 TypeError: Cannot read properties of undefined (reading 'children')
at react-native-live-markdown-parser.js:32:658
at Array.forEach ()
at react-native-live-markdown-parser.js:32:504
at globalThis.parseExpensiMarkToRanges (react-native-live-markdown-parser.js:32:3552)
at p (parserUtils.js:170:25)
at MarkdownTextInput.web.js:149:24
at MarkdownTextInput.web.js:259:16
at Object.De (react-dom.production.min.js:54:317)
at Le (react-dom.production.min.js:54:471)
at react-dom.production.min.js:55:35

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6505150_1717773033611.2024-06-07_16-59-04.mp4

logs (2).txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010bc5b9de724a6402
  • Upwork Job ID: 1803175839696750874
  • Last Price Increase: 2024-07-10
Issue OwnerCurrent Issue Owner: @hungvu193

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions