fix: complete html escape and use code arg in auto-submit callback

This commit is contained in:
2026-03-09 10:53:20 +08:00
parent 04bb023c2e
commit 65022968a5
2 changed files with 5 additions and 5 deletions

View File

@@ -84,13 +84,13 @@ async function loadChallenge() {
challengeTitle.value = `#${data.display} ${data.title}`
challengeContent.value = await marked.parse(data.content, { async: true })
connectPrompt(data.task_ptr)
onCodeComplete = async () => {
onCodeComplete = async (code) => {
if (!conversationId.value) return
try {
await Submission.create(taskId.value, {
html: html.value,
css: css.value,
js: js.value,
html: code.html ?? "",
css: code.css ?? "",
js: code.js ?? "",
conversationId: conversationId.value,
})
} catch {