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

[Hold for payment 2021-09-07] Copy and pasting text into a chat gives you html decoded strings #4759

Closed
parasharrajat opened this issue Aug 19, 2021 · 17 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@parasharrajat
Copy link
Member

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 newDot on the web.
  2. Copy some text that contains whitespaces from the Mac's Note.app or any other application.
  3. Paste that into the composer.

Expected Result:

Special Html entities should be shown correctly.

Actual Result:

You can see a lot of them in HTML form.
e.g. service.  ,   We’ve, haven’t .

Workaround:

None.

Platform:

Where is this issue occurring?

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

Version Number: latest

Notes/Photos/Videos:
https://expensify.slack.com/archives/C01GTK53T8Q/p1629395261042000?thread_ts=1627358860.323100&cid=C01GTK53T8Q

View all open jobs on GitHub

@parasharrajat parasharrajat added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Aug 19, 2021
@MelvinBot
Copy link

Triggered auto assignment to @laurenreidexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 19, 2021
@parasharrajat
Copy link
Member Author

Explanation.

  • A lot of apps use HTML entities instead of ASCII characters which when pasted to composer are not decoded.

Proposal

  1. There is a good library that does this for us https://www.npmjs.com/package/html-entities.
  2. But this contains a lot of code which we don't really need.
  3. So my idea is to extract the List of chars from https://github.com/mdevils/html-entities/blob/master/src/named-references.ts.
  4. Then using the regexp match we can convert them easily without using the library.
  5. This function will be an extended version of underscore the _.unscape https://github.com/jashkenas/underscore/blob/master/modules/_createEscaper.js

@mallenexpensify
Copy link
Contributor

@parasharrajat already fixed some examples in this GH #4169
Let's make sure we address any/all relevant ones so we don't end up with a ton of small issues/fixes (which eat away at valuable resources)

@laurenreidexpensify laurenreidexpensify removed their assignment Aug 20, 2021
@laurenreidexpensify laurenreidexpensify added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 20, 2021
@MelvinBot
Copy link

Triggered auto assignment to @kadiealexander (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 20, 2021
@laurenreidexpensify
Copy link
Contributor

I'm OOO next week so reassigning this - looks like @mallenexpensify might have a steer on whether we need to move this one to engineering

@kadiealexander kadiealexander removed their assignment Aug 22, 2021
@kadiealexander
Copy link
Contributor

Seems like a reasonable formatting change! Sending to eng for another set of eyes.

@MelvinBot
Copy link

Triggered auto assignment to @Julesssss (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Julesssss
Copy link
Contributor

Hi @parasharrajat. Love the proposal as it removes the library dependency. Please make a start when you're ready.

@Julesssss Julesssss added the External Added to denote the issue can be worked on by a contributor label Aug 23, 2021
@MelvinBot
Copy link

Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@Julesssss
Copy link
Contributor

Whoops, I assumed I was assigned via the Exported label. Please hold until we reach that step 😄

@arielgreen arielgreen added Exported Weekly KSv2 and removed Daily KSv2 labels Aug 23, 2021
@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 23, 2021
@arielgreen
Copy link
Contributor

Posted job and invited @parasharrajat.

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 23, 2021
@arielgreen
Copy link
Contributor

Whoops! Forgot to finalize the hire in Upwork before, sorry about that. @parasharrajat! Just hired you there as well.

@botify
Copy link

botify commented Aug 30, 2021

🚀 Deployed to staging by @Beamanator in version: 1.0.88-3 🚀

platform result
🤖 android 🤖 cancelled 🔪
🖥 desktop 🖥 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪
🕸 web 🕸 success ✅

@botify
Copy link

botify commented Sep 1, 2021

🚀 Deployed to production by @roryabraham in version: 1.0.90-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

@Julesssss
Copy link
Contributor

Julesssss commented Sep 2, 2021

Sorry, we missed the payment notification somehow, my fault.

@Julesssss Julesssss changed the title Copy and pasting text into a chat gives you html decoded strings [Pay on 09/09] Copy and pasting text into a chat gives you html decoded strings Sep 2, 2021
@arielgreen arielgreen changed the title [Pay on 09/09] Copy and pasting text into a chat gives you html decoded strings [Hold for payment 2021-09-07] Copy and pasting text into a chat gives you html decoded strings Sep 6, 2021
@Julesssss
Copy link
Contributor

@arielgreen this can be paid today 🎉

@arielgreen
Copy link
Contributor

Paid + bonus for reporting, thanks for your work here @parasharrajat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants