[IPython-dev] Paste images into the notebook
Matthias Bussonnier
bussonniermatthias at gmail.com
Sat Apr 26 09:46:37 EDT 2014
Hi all,
Le 26 avr. 2014 à 15:23, Juergen Hasch a écrit :
> This is due to security issues, see here:
> http://ipython.org/ipython-doc/dev/notebook/security.html
>
> You can turn sanitizing off by adding this line to your local custom.js:
> IPython.security.sanitize_html = function (html) { return html; };
This is a **really** **really** bad advice to give.
1) This mean that the image will not work on other machines.
2) If we added security it is not without reasons, and not to annoy people.
Adding this to your custom JS mean that any notebook you **look at** will be
able to execute code both **in the browser** and **in the kernel**.
It means that the author of a downloaded notebook you **put your eyes on**
potentially have now access to all your hard drive, uploaded your ssh keys,
just contaminated all the other notebook of your hard drive, stole
your credential if you are logged in, downgraded your version of open ssl to 1.0.1f
You have been warned, don't complain if all hell break loose.
--
M
>
> Juergen
>
> Am 25.04.2014 10:04, schrieb Vasco Tenner:
>> I stumbled upon this usefull extension, however, displaying the image
>> does not work on my system, with chromium 31 and ipython-master:
>>
>> If I put this in a markdowncell, only the black outline of the image is
>> displayed, but no image:
>>
>> <img
>> src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAXCAYAAAD+4+QTAAACSUlEQVRIDcVVTWgTQRT+ZkmzbemPlI3FhgobLaaKyanBgyi0eNCTXtqbFAQP6kXtwXqJXkwuElB6y0ErKB40HqpCyirSiyRaDNjW1hChskjpFtJu6boRMu6m3W7CJm5qGh0YZud7P9+8N2/fEEVRKOo8mB37X47hw+ETmJ9TqzbdOUnVrk1F8pbvp50TL8F7dHAN2fGbSI+9gSIDpKsPnaN3cGDADUYcR+JUGNbze3Hw3XPsc5lOLV9xjWR2RqGKkqXL907TuG+Qzk5M05X0DBUfXKDCtlzX0ebiYzrF99FP09nNvY7ZTDNdagqL0Qzag/fBD/Si2e1Bx1AQvPcblp7OIW85XvWAo8HQlVJYl3NQR45hasQAN1fSpeWuhuEoteWw99kkDvWypXCNO+aX4YDzo8UpQU5KBlJxZbTrz+cqii0C805YP/af56GEL2I+lsCGKGI9IUC8dQVfU0U11eZGY6sM+VUKP1WNrEhk8b4FFO7EUcgOi5ZrT3CUu41MZBgf9YCcHJoC/ejmitLHBuC5cRafw8NIPtK92JcwEfhB2vP+IVxtW7R1WJj88SG015FAPzP5saTQPfUm2ZUurGYghqJYq1BxZFdIbO7RLGEbxVrE/4nkLx4luyj/SSQkrb0Lbr0hVvEo5YQQFsZeI/tFAoUTDb4z6A4GUbD/Qzgk7rtEj0zeRYfxr+jpOhlBa5luvBELQcwF4PJ50chKWI1ex4LgR4l9GTJHk5zEiqhqJEX9qYyiDjWfG0XPtkxrlFcv4/uLiK39b6+NBEsqRwf6AAAAAElFTkSuQmCC"
>> style="height:10px; width:20px; border: 1px solid black;">bt
>>
>> If I inspect the image element using the chrome element inspector, the
>> src option is not visible. This gives the suspicion that markdown is
>> removing this.
>>
>> Is this due to a newer version of markdown?
>>
>> Kind regards,
>> Vasco
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
More information about the IPython-dev
mailing list