This commit is contained in:
parent
3b2fee6731
commit
625f82880f
|
@ -43,6 +43,16 @@ export const createHomework = ({ uniquekey, evalid, data, entpcourseid }) => {
|
||||||
|
|
||||||
let classWorkList = []
|
let classWorkList = []
|
||||||
|
|
||||||
|
// 将标签中的双引号增加转义
|
||||||
|
const escapeHtmlQuotes = (str) => {
|
||||||
|
// 后端已replace双引号, 故前端不用在处理
|
||||||
|
const regex1 = /\\+/g; // 匹配多个反斜杠
|
||||||
|
let result = str.replace(regex1, '\\');
|
||||||
|
result = str.replace(/(?<!\\)\n/g, '<br />'); //替换\n而不替换\\n 为 \\n
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取班级作业
|
* 获取班级作业
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue