Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/shared/console/console.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import React, {
useRef, useEffect, useState,
} from 'react';
import DOMPurify from 'dompurify'; // Import DOMPurify

import Button from 'components/shared/button';
import Status from 'components/shared/status';
Expand Down Expand Up @@ -195,7 +196,7 @@ const LogsLine = (props) => {
{html ? (
<span
className={classNames('loc-html', cx('line-content'))}
dangerouslySetInnerHTML={{ __html: html }}
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(html) }} // Sanitize HTML
/>
) : (
<span className={cx('line-content')}>{out}</span>
Expand Down