diff --git a/src/renderer/src/views/tool/createHomework.js b/src/renderer/src/views/tool/createHomework.js index dc1a8cf..5f3cc75 100644 --- a/src/renderer/src/views/tool/createHomework.js +++ b/src/renderer/src/views/tool/createHomework.js @@ -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而不替换\\n 为 \\n + + return result; +} + /** * 获取班级作业 */