Show More
@@ -598,7 +598,9 b' var IPython = (function (IPython) {' | |||
|
598 | 598 | if (last.output_type == 'stream' && json.stream == last.stream){ |
|
599 | 599 | // latest output was in the same stream, |
|
600 | 600 | // so append directly into its pre tag |
|
601 | this.element.find('div.'+subclass).last().find('pre').append(json.text); | |
|
601 | // escape ANSI & HTML specials: | |
|
602 | var text = utils.fixConsole(json.text); | |
|
603 | this.element.find('div.'+subclass).last().find('pre').append(text); | |
|
602 | 604 | return; |
|
603 | 605 | } |
|
604 | 606 | } |
@@ -647,6 +649,8 b' var IPython = (function (IPython) {' | |||
|
647 | 649 | |
|
648 | 650 | CodeCell.prototype.append_text = function (data, element, extra_class) { |
|
649 | 651 | var toinsert = $("<div/>").addClass("box_flex1 output_subarea output_text"); |
|
652 | // escape ANSI & HTML specials in plaintext: | |
|
653 | data = utils.fixConsole(data); | |
|
650 | 654 | if (extra_class){ |
|
651 | 655 | toinsert.addClass(extra_class); |
|
652 | 656 | } |
@@ -816,7 +816,7 b' var IPython = (function (IPython) {' | |||
|
816 | 816 | var json = {}; |
|
817 | 817 | json.output_type = msg_type; |
|
818 | 818 | if (msg_type === "stream") { |
|
819 |
json.text = |
|
|
819 | json.text = content.data; | |
|
820 | 820 | json.stream = content.name; |
|
821 | 821 | } else if (msg_type === "display_data") { |
|
822 | 822 | json = this.convert_mime_types(json, content.data); |
@@ -826,11 +826,7 b' var IPython = (function (IPython) {' | |||
|
826 | 826 | } else if (msg_type === "pyerr") { |
|
827 | 827 | json.ename = content.ename; |
|
828 | 828 | json.evalue = content.evalue; |
|
829 |
|
|
|
830 | for (var i=0; i<content.traceback.length; i++) { | |
|
831 | traceback.push(utils.fixConsole(content.traceback[i])); | |
|
832 | } | |
|
833 | json.traceback = traceback; | |
|
829 | json.traceback = content.traceback; | |
|
834 | 830 | }; |
|
835 | 831 | cell.append_output(json); |
|
836 | 832 | this.dirty = true; |
@@ -839,7 +835,7 b' var IPython = (function (IPython) {' | |||
|
839 | 835 | |
|
840 | 836 | Notebook.prototype.convert_mime_types = function (json, data) { |
|
841 | 837 | if (data['text/plain'] !== undefined) { |
|
842 |
json.text = |
|
|
838 | json.text = data['text/plain']; | |
|
843 | 839 | }; |
|
844 | 840 | if (data['text/html'] !== undefined) { |
|
845 | 841 | json.html = data['text/html']; |
General Comments 0
You need to be logged in to leave comments.
Login now