[Hold for payment 2021-09-07] Copy and pasting text into a chat gives you html decoded strings
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- open newDot on the web.
- Copy some text that contains whitespaces from the Mac's Note.app or any other application.
- 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
Triggered auto assignment to @laurenreidexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Explanation.
- A lot of apps use HTML entities instead of ASCII characters which when pasted to composer are not decoded.
Proposal
- There is a good library that does this for us https://www.npmjs.com/package/html-entities.
- But this contains a lot of code which we don't really need.
- So my idea is to extract the List of chars from https://github.com/mdevils/html-entities/blob/master/src/named-references.ts.
- Then using the regexp match we can convert them easily without using the library.
- This function will be an extended version of underscore the _.unscape https://github.com/jashkenas/underscore/blob/master/modules/_createEscaper.js
@parasharrajat already fixed some examples in this GH https://github.com/Expensify/App/issues/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)
Triggered auto assignment to @kadiealexander (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
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
Seems like a reasonable formatting change! Sending to eng for another set of eyes.
Triggered auto assignment to @Julesssss (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Hi @parasharrajat. Love the proposal as it removes the library dependency. Please make a start when you're ready.
Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Whoops, I assumed I was assigned via the Exported label. Please hold until we reach that step π
Posted job and invited @parasharrajat.
Whoops! Forgot to finalize the hire in Upwork before, sorry about that. @parasharrajat! Just hired you there as well.
π Deployed to staging by @Beamanator in version: 1.0.88-3 π
| platform | result |
|---|---|
| π€ android π€ | cancelled πͺ |
| π₯ desktop π₯ | cancelled πͺ |
| π iOS π | cancelled πͺ |
| πΈ web πΈ | success β |
π Deployed to production by @roryabraham in version: 1.0.90-2 π
| platform | result |
|---|---|
| π€ android π€ | success β |
| π₯ desktop π₯ | success β |
| π iOS π | failure β |
| πΈ web πΈ | success β |
Sorry, we missed the payment notification somehow, my fault.
@arielgreen this can be paid today π
Paid + bonus for reporting, thanks for your work here @parasharrajat!