Notebook
Safer outputs
A notebook shared by a link can hold anything… Basthon therefore strengthens the security of everything shown in the notebook and the console:
- HTML, SVG and Markdown are always sanitized with DOMPurify;
- the JavaScript code of outputs runs in an isolated frame (sandbox), with no access to the page;
- an output can no longer overflow its display area.
Interactive outputs keep working: they simply run in their sandbox.

Isolated kernels
Basthon's kernels (Python, OCaml, JavaScript, SQL and XCAS) are now isolated: the code runs in an environment separate from the web page that shows it. In practice:
- more security: the code run has no access to the data of the page (such as your login information on a site that embeds Basthon);
- a page that no longer freezes: a long computation no longer locks the interface;
- real-time display:
printandinputshow up as the run goes.

To get the former behaviour back, add the -legacy suffix to the kernel URL parameter, for instance https://console.basthon.fr/?kernel=python3-legacy. All the details are in the documentation.
The notebook in full screen
A new button in the toolbar of Basthon's notebook puts it in full screen (and back). Ideal to project in class or to work on a small screen!

PDFs in Markdown
A subject, a worksheet or an exercise in PDF format can now be shown directly in a Markdown cell of Basthon's notebook, with the <embed> tag:
<embed
src="https://basthon.fr/pdf/Basthon_Documentation.pdf"
width="100%"
height="500"
/>For security reasons, only PDF files are accepted.

An XCAS kernel in Basthon
Big news: Basthon welcomes a new language with Bernard Parisse's computer algebra system Giac/XCAS. Like the other kernels, it runs entirely in the browser, with no installation nor server.
Exact computation, factorization, equation solving, integrals, matrices, curve plotting… with a neat mathematical display. It is available in the console and in the notebook.
