Skip to content

Commit a668aeb

Browse files
committed
fix: Also escape strings printed directly to the output
Issue-87: #87
1 parent e0b52b4 commit a668aeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/markdown_exec/assets/pyodide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function clearOutput(element) {
1616
}
1717

1818
async function evaluatePython(pyodide, editor, output, session) {
19-
pyodide.setStdout({ batched: (string) => { writeOutput(output, string); } });
19+
pyodide.setStdout({ batched: (string) => { writeOutput(output, new Option(string).innerHTML); } });
2020
let result, code = editor.getValue();
2121
clearOutput(output);
2222
try {

0 commit comments

Comments
 (0)