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

Line break is removed when edit the quoted text reported by @0xmiroslav #12783

Closed
kavimuru opened this issue Nov 16, 2022 · 6 comments
Closed
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@kavimuru
Copy link

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. Login with any account
  2. Go to any chat room
  3. Type and send this message:
    Test1
    Test2
    Test3
  4. Click Edit icon from context menu

Expected Result:

Edit input is filled same as before send message:
Test1
Test2
Test3

Actual Result:

Edit input is filled like this:
Test1```
Test2
``
Test3

Workaround:

unknown

Platform:

Where is this issue occurring?

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

Version Number: 1.2.28-0
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.947.mp4
quote.mov

Expensify/Expensify Issue URL:
Issue reported by: @0xmiroslav
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1668591483946799

View all open jobs on GitHub

@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 16, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 16, 2022

Triggered auto assignment to @miljakljajic (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Overdue label Nov 21, 2022
@iwiznia
Copy link
Contributor

iwiznia commented Nov 21, 2022

Alright, did some investigations for this issue. The problem was introduced here to solve this issue and I think also here to solve this.
When leaving the following comment:
image
It is replacing <\pre><br> with just <pre> and <br><pre> with <pre>.
I am not sure how we can fix this without breaking those other cases.
While looking at this I wondered why are we not saving the exact text verbatim the user entered, that way I think we would not need an html to markup conversion and these kind of bugs would be gone....

@aldo-expensify
Copy link
Contributor

While looking at this I wondered why are we not saving the exact text verbatim the user entered

Like, why we don't just save the markdown?

@0xmiros
Copy link
Contributor

0xmiros commented Nov 21, 2022

Like, why we don't just save the markdown?

@iwiznia already opened slack discussion here

@melvin-bot
Copy link

melvin-bot bot commented Nov 22, 2022

@miljakljajic Huh... This is 4 days overdue. Who can take care of this?

@iwiznia
Copy link
Contributor

iwiznia commented Nov 22, 2022

Like, why we don't just save the markdown?

No, why don't we save exactly what the user typed, the convert it to whatever we want. Anyway, closing this.

so long as the edited version is semantically the same as the original (eg, both produce the same HTML), it's not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
None yet
Development

No branches or pull requests

5 participants