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 August 4) Fix message Editing and pasting issues. #4169

Closed
2 of 5 tasks
parasharrajat opened this issue Jul 21, 2021 · 14 comments · Fixed by Expensify/expensify-common#399
Closed
2 of 5 tasks
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@parasharrajat
Copy link
Member

parasharrajat commented Jul 21, 2021

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


ISSUES

  1. Editing a message with special characters reveals the html coding instead of the character
    https://expensify.slack.com/archives/C01GTK53T8Q/p1626788118010700

  2. Pasting into the compose box on desktop has unexpected formatting behavior when pasted from the Notes.app in macOS
    https://expensify.slack.com/archives/C01GTK53T8Q/p1626721005471400

Action Performed:

  1. Edit a message that contains &. it shows &
  2. Paste the Text from Note.app to composer.

Expected Result:

Describe what you think should've happened

  1. Special Chars encoding should not be visible.
  2. pasting the text from Notes.app and similar should not show unexpected formatting.

Actual Result:

Describe what actually happened

  1. Editing a message with special char shows encoded char.
  2. Pasting the text has extra data & unexpected Formatting.

Workaround:

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

Platform:

Where is this issue occurring?

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

Version Number: latest
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
image

Expensify/Expensify Issue URL:

View all open jobs on Upwork

@parasharrajat parasharrajat added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jul 21, 2021
@MelvinBot
Copy link

Triggered auto assignment to @alexpensify (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 Jul 21, 2021
@parasharrajat
Copy link
Member Author

Proposal

  1. We need to escape our message before we show that for editing.
    To fix this we update https://github.com/Expensify/expensify-common/blob/7d8408c5c78792394eee8e079f115b1380221a23/lib/ExpensiMark.js#L301
    htmlToMarkdown(htmlString) {
        let generatedMarkdown = _.unescape(htmlString);
 
  1. We should exclude all the tags that are not visible on UI but could be contained in HTML. For now, I can think of style and script.

For this, we need to add a new rule to this.htmlToMarkdownRules in ExpensiMark. We can add any number on tags here. for example, list tags as we don't support them.

  // Used to Exclude tags
            {
                name: 'exclude',
                regex: /<(script|style)(?:"[^"]*"|'[^']*'|[^'">])*>(.*?)<\/\1>(?![^<]*(<\/pre>|<\/code>))/gi,
                replacement: '',
            }

@alexpensify alexpensify removed their assignment Jul 21, 2021
@MelvinBot
Copy link

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

@parasharrajat
Copy link
Member Author

This issue needs attention. Thanks

@MelvinBot
Copy link

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

@Dal-Papa
Copy link

I think that proposal looks good. Let's setup a job for this.

@Dal-Papa Dal-Papa added the External Added to denote the issue can be worked on by a contributor label Jul 27, 2021
@MelvinBot
Copy link

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

@stephanieelliott
Copy link
Contributor

Job is here: https://www.upwork.com/jobs/~0121918c29f671d70f, I invited you to it on Upwork @parasharrajat!

@stephanieelliott stephanieelliott changed the title Message Editing and pasting issues. [HOLD for payment August 4) Fix message Editing and pasting issues. Jul 28, 2021
@stephanieelliott stephanieelliott added Weekly KSv2 and removed Daily KSv2 labels Jul 28, 2021
@stephanieelliott
Copy link
Contributor

Hey @parasharrajat can you please accept this job on Upwork? https://www.upwork.com/jobs/~0121918c29f671d70f

@parasharrajat
Copy link
Member Author

@stephanieelliott Already did. I just made few changes there, you must have got a notification.

@parasharrajat parasharrajat mentioned this issue Aug 2, 2021
5 tasks
@stephanieelliott
Copy link
Contributor

This Upwork job is experiencing a bug around payment, Upwork support is trying to resolve it but so far it's still open.

@parasharrajat to avoid delay, I issued payment for this as a miscellaneous payment on a prior job (issue #4171)

@parasharrajat
Copy link
Member Author

Thanks, @stephanieelliott Received it.

@mallenexpensify
Copy link
Contributor

@parasharrajat this is still happening for me, Desktop Version 1.0.85-9
Few examples service.&nbsp;&nbsp;, &nbsp; We&rsquo;ve, haven&rsquo;t .

Should the examples above have been fixed with this GH issue?

@parasharrajat
Copy link
Member Author

I think I can open a new issue for this. @mallenexpensify

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

Successfully merging a pull request may close this issue.

8 participants