Skip to content

notebook 6.4.3 sanitizes html differently than before (and differently from lab) #6172

@rabernat

Description

@rabernat

Describe the bug

In notebok 6.3.0 and earlier (and in lab 3.1.9), I am able to create custom-styled html elements inside markdown cells like this

<h1 style="color: red;">Hello!</h1>

...and they work fine.

In notebook 6.4.3, this gets sanitized to

<h1 style="undefined:undefined" id="Hello!">Hello!<a class="anchor-link" href="#Hello!">¶</a></h1>

Perhaps this is a necessary security improvement but

  • It feels like a regression, since my custom styling is now broken
  • It still works in lab, which seems inconsistent

To Reproduce
Steps to reproduce the behavior:

  1. Create a new notebook
  2. Create a markdown cell with the contents <h1 style="color: red;">Hello!</h1>
  3. "Inspect element" to see the santized style

Desktop (please complete the following information):

  • OS: iOS
  • Browser: chrome
  • Version: 6.4.3

cc @yuvipanda, who helped me diagnose this in the 2i2c slack.

Possibly related to #6109.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions