Skip to content

[$250] LHN - LHN does not display HTML code text on the message preview #43563

Closed

Description

@m-natarajan

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


Version Number: 1.4.82-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4620777
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

Pre-requisite: the user must be logged in.

  1. Go to any chat.
  2. Send this message: <a href=""takia.html"">asd
  3. Verify that LHN message preview only displays "asd" and not the entire message.

Expected Result:

The entire message should be displayed on the message preview on LHN.

Actual Result:

The HTML code text is not displayed on the message preview on LHN, only the text that the code contains.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6510214_1718164484854!image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01658743cd2f344b13
  • Upwork Job ID: 1816155806292661045
  • Last Price Increase: 2024-07-24
Issue OwnerCurrent Issue Owner: @eVoloshchak

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 12, 2024
  2. melvin-bot commented on Jun 12, 2024

    @melvin-bot

    Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. m-natarajan commented on Jun 12, 2024

    @m-natarajan
    Author

    @abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. m-natarajan commented on Jun 12, 2024

    @m-natarajan
    Author

    We think that this bug might be related to #vip-vsb

  5. bernhardoj commented on Jun 12, 2024

    @bernhardoj
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    LHN last message doesn't show HTML code written in plain text.

    What is the root cause of that problem?

    This happens after #40845 is merged. In that PR, we are converting HTML to text, so the HTML code is removed but you can still see the text inside the HTML tag.

    {parser.htmlToText(optionItem.alternateText)}

    It's to solve this issue where the last message text of the workspace #admins chat contains an HTML tag. It was a BE issue because the last message text shouldn't include any HTML tag. The one that includes the HTML tag is the last message HTML.

    What changes do you think we should make in order to solve the problem?

    Revert the change from #40845.

    I can't repro the BE issue anymore, if anyone can repro it, then it should be fixed on the BE first.

  6. melvin-bot commented on Jun 17, 2024

    @melvin-bot

    @abekkala Eep! 4 days overdue now. Issues have feelings too...

  7. abekkala commented on Jun 21, 2024

    @abekkala
    Contributor

    this will be handled by SWM

  8. 39 remaining items

  9. melvin-bot commented on Jul 30, 2024

    @melvin-bot

    Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  10. added
    ReviewingHas a PR in review
    and removed on Aug 1, 2024
  11. bernhardoj commented on Aug 1, 2024

    @bernhardoj
    Contributor

    PR is ready

    cc: @eVoloshchak

  12. abekkala commented on Aug 20, 2024

    @abekkala
    Contributor

    @eVoloshchak is there a delay in reviewing this one?

  13. bernhardoj commented on Aug 20, 2024

    @bernhardoj
    Contributor

    Oh, I forgot about this one, but we actually needs a BE fix to be able to merge the PR.

  14. bernhardoj commented on Aug 21, 2024

    @bernhardoj
    Contributor

    @bondydaa can you check if you can handle the BE issue?

  15. bondydaa commented on Aug 21, 2024

    @bondydaa
    Contributor

    👀 taking a look, I had actually just reviewed a PR somewhat related to these though I don't think it would have fixed this exactly

  16. bondydaa commented on Aug 21, 2024

    @bondydaa
    Contributor

    okay actually after discussing this with the team, I was mistaken on the intended behavior here and this isn't actually a bug and shouldn't have been assigned out.

    This is working as intended, as was written on #40845.

    we don't actually want to support HTML in messages, when sending something like
    image

    we still consider that just text not actually HTML.

    we want to have the support for the markdown parsing / html stripping in the LHN which means that text like <p>this is a test of html tags</p> only shows up like this is a test of html tags which we are fine with.

    closing this out and the associated PR, sorry about that!

    context link to internal discussion: https://expensify.slack.com/archives/C03TQ48KC/p1724256711905129

  17. bernhardoj commented on Aug 21, 2024

    @bernhardoj
    Contributor

    we still consider that just text not actually HTML.

    this is a test of html tags

    only shows up like this is a test of html tags which we are fine with.

    I can't access the internal disc, but if we consider it as a text, shouldn't we show the text as it is in the last message just like before? Also, if we type any HTML tag in a code block, the HTML tag will be removed too. For example, if we send,

    here is the code: `<a>test</a>`
    

    the last message will be: here is the code: test

    If we follow WhatsApp for example, they just show the text as it is.
    image

  18. melvin-bot commented on Sep 29, 2025

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions