From ebfe9d57834695dbb6271e20ffa3ddf3f14c1c07 Mon Sep 17 00:00:00 2001 From: Jakub Magiera Date: Wed, 8 Jul 2026 15:40:27 +0200 Subject: [PATCH] render report name as HTML conditionally --- .../MoneyRequestConfirmationList/sections/ReportField.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx b/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx index 379a8574dc3c..5ab075d1325f 100644 --- a/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx +++ b/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx @@ -7,6 +7,7 @@ import useReportAttributes from '@hooks/useReportAttributes'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import Parser from '@libs/Parser'; import {getReportName} from '@libs/ReportNameUtils'; import {generateReportID, getOutstandingReportsForUser, isMoneyRequestReport, isReportOutstanding} from '@libs/ReportUtils'; @@ -115,6 +116,8 @@ function ReportField({selectedParticipants, iouType, reportID, reportActionID, a return name; })(); + const shouldRenderReportNameAsHTML = Parser.isHTML(reportName); + const outstandingReports = useOutstandingReports(undefined, isFromGlobalCreate && !isPerDiemRequest ? undefined : policyID, ownerAccountID, false); // When creating an expense in an individual report, the report field becomes read-only // since the destination is already determined and there's no need to show a selectable list. @@ -134,7 +137,7 @@ function ReportField({selectedParticipants, iouType, reportID, reportActionID, a Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_REPORT.getRoute(action, iouType, transactionID, selectedReportID, Navigation.getActiveRoute(), reportActionID)); }} interactive={shouldReportBeEditable} - shouldRenderAsHTML + shouldRenderAsHTML={shouldRenderReportNameAsHTML} sentryLabel={CONST.SENTRY_LABEL.REQUEST_CONFIRMATION_LIST.REPORT_FIELD} /> );