-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Reports - Description with mark down is rendered as HTML tag #58268
Comments
Triggered auto assignment to @Beamanator ( |
Triggered auto assignment to @sakluger ( |
💬 A slack conversation has been started in #expensify-open-source |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
🚨 Edited by proposal-police: This proposal was edited at 2025-03-12 09:47:25 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Description field shows the mark down as HTML tag. What is the root cause of that problem?It seems that BE is returning description in a different format which makes the parse function we are using here wrong. App/src/components/SelectionList/Search/TransactionListItemRow.tsx Lines 150 to 153 in 9b51ab8
What changes do you think we should make in order to solve the problem?We should remove
![]() OR we can use What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
@Beamanator I can help to raise a quick PR if needed. |
@Krishna2323 @mananjadhav is this from your PR too? |
This is edge case, no need to block |
Sounds good to me! |
@mountiny mind linking the PR you are thinking? |
This came from my PR #44523. Will push a fix PR in several hours. |
Thank you!! |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue arises when submitting an expense with markdown in the description. The description is incorrectly rendered with raw HTML tags instead of the expected markdown format. This issue is reproducible on the staging environment but not on production. What is the root cause of that problem?The problem stems from how the description field is being processed and rendered. The current approach using Parser.replace(description) and Parser.htmlToText is not adequately handling the markdown content, causing raw HTML tags to be displayed instead of the expected rendering. The issue occurs because the system is not correctly formatting the description when displaying it in the Reports section. This discrepancy arises due to the improper parsing mechanism in place, as seen in the original code. File:
What changes do you think we should make in order to solve the problem?We can solve this issue by applying a more tailored approach using the
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?Test Case 1: Ensure that markdown content in the description is displayed correctly (i.e., no raw HTML tags, proper rendering of markdown elements like bold, italics, links, etc.). What alternative solutions did you explore? (Optional)The main alternative solution was to continue using |
📣 @yaqoob2ishaq4! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@Beamanator feel free to reassign to me if you want to |
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: 9.1.11-4
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+110301kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Search
Action Performed:
Expected Result:
Description field will not show the mark down as HTML tag.
Actual Result:
Description field shows the mark down as HTML tag.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6768397_1741770460004.20250312_170331.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: