-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Resolves #2236: Fixed jupyter notebook inline title #2306
Conversation
znation
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment needs to be addressed; also, the Travis CI run is failing (not sure why).
| </style> \ | ||
| </head> \ | ||
| <body> \ | ||
| <h1> '+ title +' </h1> \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title needs to be HTML encoded; otherwise some values of title could cause malformed HTML. You can use the HTML.escape in Python 3 and cgi.escape in Python 2 for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @znation ! Will check and raise PR
znation
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, otherwise this is ready to go in. Thanks!
| from PIL import Image | ||
|
|
||
| import base64 | ||
| import cgi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put these imports within the if/else conditions where they are used. Otherwise one of the imports may fail on Python 2 or Python 3 (I think the html module is new in Python 3).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@znation Thanks for your suggestion! Changes are implemented and request for PR
This PR resolves #2236
Fixed Jupyter notebook inline title