Skip to content

Commit

Permalink
Use sanitizeHtml
Browse files Browse the repository at this point in the history
  • Loading branch information
FadhlanR committed Jan 17, 2025
1 parent e11a312 commit 43de05a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/host/app/lib/matrix-classes/message-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getOwner, setOwner } from '@ember/owner';

import { inject as service } from '@ember/service';

import { LooseSingleCardDocument } from '@cardstack/runtime-common';
import { LooseSingleCardDocument, sanitizeHtml } from '@cardstack/runtime-common';

import {
APP_BOXEL_COMMAND_MSGTYPE,
Expand Down Expand Up @@ -190,5 +190,5 @@ export function buildMessageCommand({
}

export function formattedMessageForCommand(formattedBody: string) {
return `<p data-test-command-message class="command-message">${formattedBody}</p>`;
return `<p data-test-command-message class="command-message">${sanitizeHtml(formattedBody)}</p>`;
}

0 comments on commit 43de05a

Please sign in to comment.