Skip to content
Closed
Show file tree
Hide file tree
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
15 changes: 15 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,22 @@ $input-focus-box-shadow: $input-box-shadow; // hack to get upgrade to paragon 4.
right: 1rem !important;
}
}

.confirm-modal .pgn__modal-body {
overflow: hidden;
}

.pgn__modal-body-content {
& img {
object-fit: contain;
max-width: 100%;
height: auto;
}

& blockquote > p {
border-left: 2px solid $gray-200;
margin-left: 1.5rem;
padding-left: 1rem;
}
}
}
9 changes: 8 additions & 1 deletion src/containers/ResponseDisplay/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import parse from 'html-react-parser';
import { selectors } from 'data/redux';
import { fileUploadResponseOptions } from 'data/services/lms/constants';

import { getConfig } from '@edx/frontend-platform';
import SubmissionFiles from './SubmissionFiles';
import PreviewDisplay from './PreviewDisplay';

Expand All @@ -26,7 +27,13 @@ export class ResponseDisplay extends React.Component {
}

get textContents() {
return this.props.response.text.map(text => parse(this.purify.sanitize(text)));
const { text } = this.props.response;

const formattedText = text
.map((item) => item.replaceAll(/\.\.\/asset/g, `${getConfig().LMS_BASE_URL}/asset`))
.map((item) => parse(this.purify.sanitize(item)));

return formattedText;
}

get submittedFiles() {
Expand Down
Loading