Skip to content

Commit cb5cebe

Browse files
author
Philip Guo
committed
minor
1 parent 7134ed3 commit cb5cebe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

edu-python.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ function renderData(obj, jDomElt) {
409409
var literalStr = htmlspecialchars(obj);
410410

411411
// print as a double-quoted string literal
412-
literalStr = literalStr.replace('\"', '\\"'); // escape action!
412+
literalStr = literalStr.replace(new RegExp('\"', 'g'), '\\"'); // replace ALL
413413
literalStr = '"' + literalStr + '"';
414414

415415
jDomElt.append('<span class="stringObj">' + literalStr + '</span>');

0 commit comments

Comments
 (0)