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

HTML elements are displayed when editing a comment and adding markdown #4702

Closed
isagoico opened this issue Aug 17, 2021 · 9 comments
Closed
Assignees
Labels
Engineering Improvement Item broken or needs improvement. Monthly KSv2 Reviewing Has a PR in review

Comments

@isagoico
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. Navigate to a conversation
  2. Send a message
  3. Edit the message and add a markdown to any of the words

Expected Result:

LHN should show the message preview without any HTML elements

Actual Result:

LHN preview shows HTML elements

Workaround:

No need. Visual issue.

Platform:

Where is this issue occurring?

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

Version Number: 1.0.85-6

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos:

This only happens when adding markdown when editing messages.

image

Expensify/Expensify Issue URL:

View all open jobs on GitHub


From @puneetlath https://expensify.slack.com/archives/C01GTK53T8Q/p1629137110399300

LHN shows html element if you edit in markdown tags. Doesn’t do it if you put the markdown tag in the original message.

@MelvinBot
Copy link

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

@MelvinBot
Copy link

@cead22 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@cead22
Copy link
Contributor

cead22 commented Aug 23, 2021

I missed this assignment but I was able to reproduce. Looking to see if this can be sent to external contributors

@MelvinBot MelvinBot removed the Overdue label Aug 23, 2021
@parasharrajat
Copy link
Member

parasharrajat commented Aug 24, 2021

Proposal

Ok, I have found the issue.
Here this code sets the HTML as the last message text which should be text.

lastMessageText: message.html,

to as we backend don't send a text.

lastMessageText: Str.stripHTML(htmlForNewComment.replace(/((<br[^>]*>)+)/gi, ' '))

@cead22 cead22 removed their assignment Aug 24, 2021
@MelvinBot
Copy link

Triggered auto assignment to @NikkiWines (Demolition), see https://stackoverflow.com/c/expensify/questions/8099 for more details.

@cead22
Copy link
Contributor

cead22 commented Aug 24, 2021

@NikkiWines
Copy link
Contributor

Don't have a ton of time for this one at the moment with allocations - gonna drop it down to a weekly and hold it for a bit and if I haven't gotten to it by next week I'll ping #eng-chat to see if there's someone who wants to take over.

@NikkiWines NikkiWines added Weekly KSv2 Improvement Item broken or needs improvement. and removed Daily KSv2 labels Aug 25, 2021
@NikkiWines
Copy link
Contributor

Gonna work on this today!

@MelvinBot
Copy link

This issue has not been updated in over 15 days. @NikkiWines eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@MelvinBot MelvinBot added the Monthly KSv2 label Sep 27, 2021
@botify botify closed this as completed Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Improvement Item broken or needs improvement. Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

7 participants