App: [HOLD for payment 2023-05-16] [$1000] HTML in edit box is parsed after reloading, but that doesn't happen in normal composer

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. open a chat and send a msg
  2. edit it and write an html tag like <h1>abc</h1>
  3. Without saving, reload the page
  4. Now repeat the steps for a new message in composer

Expected results:

html tags should either not be parsed in both edit composer and new composer, or should be parsed in both composers. Also, parsing should be instantaneous, without needing to reload

Actual results:

HTML in edit box is parsed after reloading, but that doesn’t happen in normal composer

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.4 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: 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/43996225/233813478-42c2e019-c5d7-4545-ac7e-92189ab4525b.mp4

https://user-images.githubusercontent.com/43996225/233813480-2ccc0178-b061-41a1-bb74-a73999030c0c.mp4

Expensify/Expensify Issue URL: Issue reported by: @chiragxarora Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1682163823425989

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011c3c44a587c09ce7
  • Upwork Job ID: 1650879526556016640
  • Last Price Increase: 2023-04-25

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 36 (25 by maintainers)

Most upvoted comments

Paid and closed job!

Thanks @eh2077, for the update. I found another issue with your proposal.

https://user-images.githubusercontent.com/25520267/235300224-63cd1dd7-5fa5-47e0-b380-0e0b84d9b08f.mov

Because you convert the drafted message with _.escape, when the draft message is nothing it’s using the report action message HTML as the draft. I guess we could only escape the string if it’s not from the action HTML.

That will work, but that will create a new key just for {hasDraft: true} report actions, which will be messy.

In general, do not add a new collection key if it can be avoided. There is most likely a more logical place to put the state. And failing to associate a state property with it’s logical owner is something we consider to be an anti-pattern (unnecessary data structure adds complexity for no value).