baigl #16

Merged
baigl merged 3 commits from baigl into main 2024-11-07 09:46:29 +08:00
1 changed files with 10 additions and 0 deletions
Showing only changes of commit 625f82880f - Show all commits

View File

@ -43,6 +43,16 @@ export const createHomework = ({ uniquekey, evalid, data, entpcourseid }) => {
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;
}
/**
* 获取班级作业
*/