lsc 1 year ago
parent
commit
f508475e3e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      js/Desktop/DeskTop.js

+ 2 - 2
js/Desktop/DeskTop.js

@@ -6449,7 +6449,7 @@ U.MD.D.I.openApplicationYu = function (str, cid, stage, task, tool) {
                 text = await U.MD.D.I.getEditorContent(_iframe);
                 type = '2'
             } else if (aTool == 57) {
-                text = _iframe.contentWindow.getLoadXmlStr()
+                text = encodeURIComponent(_iframe.contentWindow.getLoadXmlStr())
                 type = '4'
             }
             _loading.style.display = 'flex'
@@ -6559,7 +6559,7 @@ U.MD.D.I.setContents = function (cid, s, task, t, uid, type, text, loading, span
     // xmlhttp.open("POST", "http://localhost:7003/api/pbl/" + "insertWord2y", true);
     xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
     // 设置请求头,表示请求体的编码格式
-    xmlhttp.send("uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&text=" + JSON.stringify(text) + "&type=" + type);
+    xmlhttp.send("uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&text=" + text + "&type=" + type);
     // 设置请求体,使用url-encoded格式的数据
 }