You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-08-11] [$250] Split scan - Description with mark down is displayed in HTML tags on the expense preview #65889
Version Number: 9.1.79-7 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/6467090 Email or phone of affected tester (no customers):applausetester+sdsdk90s@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.5 / Chrome App Component: Money Requests
Action Performed:
Go to staging.expensify.com
Open 1:1 DM.
Click + > Split expense > Scan.
Upload a photo.
On the confirmation page, click Description.
Enter text with any mark down and save it.
Click Split expense.
Click on the split preview.
Manually enter amount and save it.
Expected Result:
Description with mark down will be rendered properly in mark down.
Actual Result:
Description with mark down is displayed in HTML tags on the expense preview and transaction thread.
Please re-state the problem that we are trying to solve in this issue.
Description with mark down is displayed in HTML tags on the expense preview and transaction thread.
What is the root cause of that problem?
When we complete the split bill without changing the description, updatedTransaction?.comment?.comment is already the HTML tag, and it's parsed again here. So it's displayed as HTML tags on the expense preview.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update completeSplitBill unit test and verify the comment is correct format
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.
And with this transaction the comment sent from the server is in html format.
In the getUpdatedTransaction function, when creating the draft transaction, the comment is not converted back to markdown but stored directly as HTML. This causes the server to escape it again on upload, resulting in:
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.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
N/A
Result
Description before
Description after
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.
I don't think people would use markdown headers in an expense description. But if they did for some really weird reason, we should just render it as/convert to Bold or nothing at all.
We should do that with anything that is not supported. e.g. if customer was to paste in something from a web listing, we should make it plain IMO.
changed the title [-]Split scan - Description with mark down is displayed in HTML tags on the expense preview[/-][+][$250] Split scan - Description with mark down is displayed in HTML tags on the expense preview[/+]on Jul 15, 2025
changed the title [-][$250] Split scan - Description with mark down is displayed in HTML tags on the expense preview[/-][+][Due for payment 2025-08-11] [$250] Split scan - Description with mark down is displayed in HTML tags on the expense preview[/+]on Aug 4, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.88-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307@RachCHopkins The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Jul 10, 2025
Triggered auto assignment to @RachCHopkins (
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.mkzie2 commentedon Jul 10, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Description with mark down is displayed in HTML tags on the expense preview and transaction thread.
What is the root cause of that problem?
When we complete the split bill without changing the description,
updatedTransaction?.comment?.commentis already the HTML tag, and it's parsed again here. So it's displayed as HTML tags on the expense preview.App/src/libs/actions/IOU.ts
Lines 6924 to 6929 in ccfdb74
What changes do you think we should make in order to solve the problem?
We should convert to markdown first to ensure the
parsedCommentis correct.App/src/libs/actions/IOU.ts
Lines 6924 to 6929 in ccfdb74
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
completeSplitBillunit test and verify the comment is correct formatWhat 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.
dmkt9 commentedon Jul 11, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Description with mark down is displayed in HTML tags on the expense preview and transaction thread.
What is the root cause of that problem?
When any field of a split transaction is changed, it is saved as a draft using the
setDraftSplitTransactionutility.App/src/libs/actions/IOU.ts
Line 7172 in d40d0af
Inside
setDraftSplitTransaction, if the draft transaction does not exist, it looks up the original transaction to create the draft.App/src/libs/actions/IOU.ts
Lines 7178 to 7183 in d40d0af
And with this transaction the comment sent from the server is in html format.
In the
getUpdatedTransactionfunction, when creating the draft transaction, the comment is not converted back to markdown but stored directly as HTML. This causes the server to escape it again on upload, resulting in:App/src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx
Line 127 in d40d0af
returning an HTML string.
What changes do you think we should make in order to solve the problem?
Ensure that comments are converted back to markdown here:
App/src/libs/actions/IOU.ts
Lines 7178 to 7180 in d40d0af
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add a test for
getUpdatedTransactionvàsetDraftSplitTransactionto cover this scenario.What alternative solutions did you explore? (Optional)
Ensure that comments are converted back to markdown whenever the description field hasn’t changed.
App/src/libs/TransactionUtils/index.ts
Lines 400 to 405 in d40d0af
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.
PiyushChandra17 commentedon Jul 11, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Split scan - Description with mark down is displayed in HTML tags on the expense preview
What is the root cause of that problem?
Currently we are passing
shouldRenderAsHTMLprop hereApp/src/components/ReportActionItem/MoneyRequestView.tsx
Line 654 in 509bd7b
which is instead of text it is using highly rich text as
RenderHTMLnow,
App/src/components/MenuItem.tsx
Line 577 in 509bd7b
This line is the root cause, we need to replace HTML with markdown
Root cause: This issue was introduced when we added
RenderHTMLhereApp/src/components/MenuItem.tsx
Line 830 in 509bd7b
What changes do you think we should make in order to solve the problem?
Update this line
App/src/components/MenuItem.tsx
Line 577 in 509bd7b
with,
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
N/A
Result
Description before

Description after

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.
melvin-bot commentedon Jul 14, 2025
@RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!
RachCHopkins commentedon Jul 15, 2025
I don't think people would use markdown headers in an expense description. But if they did for some really weird reason, we should just render it as/convert to Bold or nothing at all.
We should do that with anything that is not supported. e.g. if customer was to paste in something from a web listing, we should make it plain IMO.
[-]Split scan - Description with mark down is displayed in HTML tags on the expense preview[/-][+][$250] Split scan - Description with mark down is displayed in HTML tags on the expense preview[/+]melvin-bot commentedon Jul 15, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021944911737496561361
31 remaining items
[-][$250] Split scan - Description with mark down is displayed in HTML tags on the expense preview[/-][+][Due for payment 2025-08-11] [$250] Split scan - Description with mark down is displayed in HTML tags on the expense preview[/+]melvin-bot commentedon Aug 4, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 4, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.88-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-08-11. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 4, 2025
@dukenv0307 @RachCHopkins The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
dukenv0307 commentedon Aug 5, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/44523/files#r2253073031
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/534922
Regression Test Proposal
Test:
Do we agree 👍 or 👎
RachCHopkins commentedon Aug 11, 2025
Payment Summary:
Upwork job here
RachCHopkins commentedon Aug 11, 2025
Contributor has been paid, the contract has been completed, and the Upwork post has been closed.
@dukenv0307 you have the 🟢 to request payment.
garrettmknight commentedon Aug 20, 2025
$250 approved for @dukenv0307