Skip to content

Commit 7134ed3

Browse files
author
Philip Guo
committed
minor formatting changes
1 parent 14f54b7 commit 7134ed3

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

edu-python.css

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ table.classTbl td.classKey {
369369
padding-top: 10px;
370370
padding-bottom: 10px;
371371
padding-left: 10px;
372-
padding-right: 6px;
372+
padding-right: 8px;
373373

374374
text-align: right;
375375
vertical-align: center;
@@ -381,8 +381,8 @@ table.classTbl td.classVal {
381381
padding-top: 10px;
382382
padding-bottom: 10px;
383383
padding-right: 10px;
384-
padding-left: 6px;
385-
vertical-align: top;
384+
padding-left: 8px;
385+
vertical-align: center;
386386
}
387387

388388

@@ -403,7 +403,7 @@ table.instTbl td.instKey {
403403
padding-top: 10px;
404404
padding-bottom: 10px;
405405
padding-left: 10px;
406-
padding-right: 6px;
406+
padding-right: 8px;
407407

408408
text-align: right;
409409
vertical-align: center;
@@ -415,12 +415,11 @@ table.instTbl td.instVal {
415415
padding-top: 10px;
416416
padding-bottom: 10px;
417417
padding-right: 10px;
418-
padding-left: 6px;
419-
vertical-align: top;
418+
padding-left: 8px;
419+
vertical-align: center;
420420
}
421421

422422

423-
424423
.typeLabel {
425424
font-size: 8pt;
426425
color: #222222;

edu-python.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ function renderData(obj, jDomElt) {
407407
else if (typ == "string") {
408408
// escape using htmlspecialchars to prevent HTML/script injection
409409
var literalStr = htmlspecialchars(obj);
410+
411+
// print as a double-quoted string literal
412+
literalStr = literalStr.replace('\"', '\\"'); // escape action!
413+
literalStr = '"' + literalStr + '"';
414+
410415
jDomElt.append('<span class="stringObj">' + literalStr + '</span>');
411416
}
412417
else if (typ == "object") {

0 commit comments

Comments
 (0)