We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7134ed3 commit cb5cebeCopy full SHA for cb5cebe
1 file changed
edu-python.js
@@ -409,7 +409,7 @@ function renderData(obj, jDomElt) {
409
var literalStr = htmlspecialchars(obj);
410
411
// print as a double-quoted string literal
412
- literalStr = literalStr.replace('\"', '\\"'); // escape action!
+ literalStr = literalStr.replace(new RegExp('\"', 'g'), '\\"'); // replace ALL
413
literalStr = '"' + literalStr + '"';
414
415
jDomElt.append('<span class="stringObj">' + literalStr + '</span>');
0 commit comments