-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2022-10-31] [$250] BUG: Copy pasting a string with html special characters from the chat to another source results in getting decoded characters #11693
Comments
Triggered auto assignment to @mateocole ( |
Triggered auto assignment to @tjferriss ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Current assignee @Beamanator is eligible for the External assigner, not assigning anyone new. |
Moving this along a bit - this is something we usually work out externally 👍 |
Proposal This is caused by the render method from the App/src/libs/SelectionScraper/index.js Lines 132 to 138 in f654cc1
One way to resolve this is to use the underscore unescape function to unescape the returned string. - const newHtml = render(domRepresentation);
+ const newHtml = _.unescape(render(domRepresentation)); result: issue11693.mp4 |
Posting is on UpWorks.... Internal job posting - https://www.upwork.com/ab/applicants/1579848042371682304/job-details External job posting - https://www.upwork.com/jobs/~0125c406f21abe54eb |
Couple of notes:
|
ProposalUsing diff --git a/src/libs/SelectionScraper/index.js b/src/libs/SelectionScraper/index.js
index 99405259e..317b72741 100644
--- a/src/libs/SelectionScraper/index.js
+++ b/src/libs/SelectionScraper/index.js
@@ -133,7 +133,7 @@ const getCurrentSelection = () => {
const domRepresentation = parseDocument(getHTMLOfSelection());
domRepresentation.children = _.map(domRepresentation.children, replaceNodes);
- const newHtml = render(domRepresentation);
+ const newHtml = Str.htmlDecode(render(domRepresentation));
return newHtml || '';
};
Screen.Recording.2022-10-12.at.21.30.21.mov |
@mollfpr's proposal to use cc - @Beamanator 🎀 👀 🎀 |
📣 @mollfpr You have been assigned to this job by @Beamanator! |
I found a bug when you try to copy the last chat from a thread by highlighting all the text, it's copying the text I select and also some random text. I think that bug has nothing to do with this issue right? @mananjadhav @Beamanator |
I think you're right @mollfpr - sounds like a different part of the codebase 👍 |
@mollfpr can you please apply for the job on Upworks? https://www.upwork.com/jobs/~0125c406f21abe54eb |
@tjferriss Applied, thank you! |
@tjferriss fyi, I've applied to the same link for C+. |
Hired @mananjadhav as C+ and @mollfpr to fix the issue. Can you both confirm here once accepted? |
Thanks @tjferriss I've accepted for C+ |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.18-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2022-10-31. 🎊 |
@tjferriss Quick bump on the Upwork payment for this one. |
Yes, thank you. I've initiated the payments in Upworks. The contract has been completed and the Upwork post has been closed. |
It seems that this issue's PR caused a regression #12271 |
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:
Expected Result:
The text shouldn't be pasted as decoded characters
Actual Result:
Text is pasted as decoded characters (SELECT count(1) FROM receipts WHERE state IN (3,4,5) AND created >= date("now", "-30 day");)
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.2.12-2
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:
Recording.658.mp4
Expensify/Expensify Issue URL:
Issue reported by: @coleaeason
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1664835972610759
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: