fix(client): replace decodeHTMLEntities to entities package
This commit is contained in:
@@ -39,8 +39,6 @@ import {
|
||||
import './classic.css';
|
||||
import '../components/test-frame.css';
|
||||
|
||||
import decodeHTMLEntities from '../../../../utils/decodeHTMLEntities';
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
files: challengeFilesSelector,
|
||||
tests: challengeTestsSelector,
|
||||
@@ -237,7 +235,7 @@ class ShowClassic extends Component {
|
||||
* Your test output will go here.
|
||||
*/
|
||||
`}
|
||||
output={decodeHTMLEntities(output)}
|
||||
output={output}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import React, { Fragment, Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import MonacoEditor from 'react-monaco-editor';
|
||||
import { decodeHTML } from 'entities';
|
||||
|
||||
const propTypes = {
|
||||
defaultOutput: PropTypes.string,
|
||||
@@ -51,7 +52,7 @@ class Output extends Component {
|
||||
editorDidMount={::this.editorDidMount}
|
||||
height={height}
|
||||
options={options}
|
||||
value={output ? output : defaultOutput}
|
||||
value={decodeHTML(output ? output : defaultOutput)}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
|
@@ -148,7 +148,9 @@ function* executeTests(testRunner) {
|
||||
throw err;
|
||||
}
|
||||
} catch (err) {
|
||||
newTest.message = text.replace(/<code>(.*?)<\/code>/g, '$1');
|
||||
newTest.message = text
|
||||
.replace(/<code>(.*?)<\/code>/g, '$1')
|
||||
.replace(/<wbr>/g, '');
|
||||
if (err === 'timeout') {
|
||||
newTest.err = 'Test timed out';
|
||||
newTest.message = `${newTest.message} (${newTest.err})`;
|
||||
|
Reference in New Issue
Block a user