diff --git a/src/components/ReportActionItem/TaskAction.tsx b/src/components/ReportActionItem/TaskAction.tsx
index e85a2e708feb..a782d3e9e051 100644
--- a/src/components/ReportActionItem/TaskAction.tsx
+++ b/src/components/ReportActionItem/TaskAction.tsx
@@ -18,7 +18,11 @@ function TaskAction({action}: TaskActionProps) {
return (
- {message.html ? ${message.html}`} /> : {message.text}}
+ {message.html ? (
+ ${message.html}`} />
+ ) : (
+ {message.text}
+ )}
);
}
diff --git a/src/components/ReportActionItem/TaskView.tsx b/src/components/ReportActionItem/TaskView.tsx
index ee3097e051b2..9ddcecf8f098 100644
--- a/src/components/ReportActionItem/TaskView.tsx
+++ b/src/components/ReportActionItem/TaskView.tsx
@@ -135,7 +135,7 @@ function TaskView({report, ...props}: TaskViewProps) {
Navigation.navigate(ROUTES.REPORT_DESCRIPTION.getRoute(report.reportID))}
diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts
index 9c5e437a874e..ea94e2030d1c 100644
--- a/src/libs/ReportUtils.ts
+++ b/src/libs/ReportUtils.ts
@@ -4539,7 +4539,7 @@ function buildOptimisticEditedTaskFieldReportAction({title, description}: Task):
{
type: CONST.REPORT.MESSAGE.TYPE.COMMENT,
text: changelog,
- html: changelog,
+ html: description ? getParsedComment(changelog) : changelog,
},
],
person: [
diff --git a/src/libs/actions/Task.ts b/src/libs/actions/Task.ts
index fab1374ebea6..08f04688e28a 100644
--- a/src/libs/actions/Task.ts
+++ b/src/libs/actions/Task.ts
@@ -438,7 +438,7 @@ function editTask(report: OnyxTypes.Report, {title, description}: OnyxTypes.Task
const reportName = (title ?? report?.reportName)?.trim();
// Description can be unset, so we default to an empty string if so
- const reportDescription = (description ?? report.description ?? '').trim();
+ const reportDescription = ReportUtils.getParsedComment((description ?? report.description ?? '').trim());
const optimisticData: OnyxUpdate[] = [
{
diff --git a/src/pages/tasks/TaskDescriptionPage.tsx b/src/pages/tasks/TaskDescriptionPage.tsx
index 58fddda73bd2..c48746c81239 100644
--- a/src/pages/tasks/TaskDescriptionPage.tsx
+++ b/src/pages/tasks/TaskDescriptionPage.tsx
@@ -47,7 +47,7 @@ function TaskDescriptionPage({report, currentUserPersonalDetails}: TaskDescripti
const submit = useCallback(
(values: FormOnyxValues) => {
- if (parser.htmlToMarkdown(parser.replace(values.description)) !== parser.htmlToMarkdown(parser.replace(report?.description ?? '')) && !isEmptyObject(report)) {
+ if (values.description !== parser.htmlToMarkdown(report?.description ?? '') && !isEmptyObject(report)) {
// Set the description of the report in the store and then call EditTask API
// to update the description of the report on the server
Task.editTask(report, {description: values.description});
@@ -110,7 +110,7 @@ function TaskDescriptionPage({report, currentUserPersonalDetails}: TaskDescripti
name={INPUT_IDS.DESCRIPTION}
label={translate('newTaskPage.descriptionOptional')}
accessibilityLabel={translate('newTaskPage.descriptionOptional')}
- defaultValue={parser.htmlToMarkdown((report && parser.replace(report?.description ?? '')) || '')}
+ defaultValue={parser.htmlToMarkdown(report?.description ?? '')}
ref={(element: AnimatedTextInputRef) => {
if (!element) {
return;