Skip to content

HTML doesn't render in checkbox description #3745

@MattMcDowall

Description

@MattMcDowall

Description

With ipywidgets <8.0, it was possible to include HTML in Checkbox descriptions, and it would render in the display. Now it simply renders as plain text, HTML tags and all.

Reproduce

data = ['Plain text item', 'Item with <b>boldface</b>', 'Item with <a href="http://github.com">a link</a>']
boxes = [widgets.Checkbox(value=False, description=d) for d in data]
widgets.VBox(children=boxes)

Expected behavior

This is how it renders in 7.7.4:

  • Plain text item
  • Item with boldface
  • Item with a link

But after upgrading ipywidgets to 8.0.5, it renders as:

  • Plain text item
  • Item with <b>boldface</b>
  • Item with <a href="http‎://github.com">a link</a>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions