dev / notes

# Using Raw Cells

Jupyter allows you to use raw cells where the content gets rendered without modification. Falsifiable complies. For example, if you created a raw cell with the content,

<table>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
</table>


falsifiable emits,

For some cases, this works well. Hand-crafting some HTML to get the presentation you want may be much faster than writing a generator. However, there are limitations. For the sake of security, user-generated content (UGC) is sanitized at the conclusion of rendering. So, for example, if you wrote,

<a href="javascript:alert('computer infected')" onmouseover="alert('send bitcoin')">
<a>


it is rendered as,

with the href and onmouseover stripped. This protects users from a variety of attacks. The downside is it takes one large tool out of your toolbelt: CSS. For example, if you wrote,

<p style="font-size:100px">big text</p>


it is rendered as,

big text

For the most part, other tags like <style>, <script>, <iframe>, and <object> are stripped completely. However, there are a few critical exceptions. For example, you can copy the youtube embed code for Carl Sagan’s Pale Blue dot,

<iframe
width="560" height="315"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>


it renders as expected (with a few properties stripped).

Another importantThe ExTrEmElY OnLiNe life is the one for me. exception is embedded tweets. If you copy and paste the embed code as specified by twitter,

<blockquote class="twitter-tweet">
<p lang="en" dir="ltr">
Procrastination is problem solving.<br><br>
...it just doesn&#39;t solve the problem which needs solving.