Show More
@@ -449,7 +449,7 b' class MarkupRenderer(object):' | |||||
449 | cell.source = cls.sanitize_html(cell.source) |
|
449 | cell.source = cls.sanitize_html(cell.source) | |
450 | return cell, resources |
|
450 | return cell, resources | |
451 |
|
451 | |||
452 | for cell_output in cell.outputs: |
|
452 | for cell_output in cell.get('outputs', []): | |
453 | if 'data' in cell_output: |
|
453 | if 'data' in cell_output: | |
454 | if 'application/javascript' in cell_output['data']: |
|
454 | if 'application/javascript' in cell_output['data']: | |
455 | cell_output['data']['text/plain'] = sandbox_text |
|
455 | cell_output['data']['text/plain'] = sandbox_text | |
@@ -553,7 +553,7 b' class MarkupRenderer(object):' | |||||
553 | else: |
|
553 | else: | |
554 | try: |
|
554 | try: | |
555 | body, _ = as_html(notebook) |
|
555 | body, _ = as_html(notebook) | |
556 | except AttributeError: |
|
556 | except (AttributeError, nbformat.ValidationError): | |
557 | try: |
|
557 | try: | |
558 | nbformat.validate(nbformat.reader.reads(source)) |
|
558 | nbformat.validate(nbformat.reader.reads(source)) | |
559 | except nbformat.ValidationError as exc: |
|
559 | except nbformat.ValidationError as exc: |
General Comments 0
You need to be logged in to leave comments.
Login now