Skip to content

Commit

Permalink
Revert "clean_html: allow SVG tags and SVG attributes (jupyter#1890)"
Browse files Browse the repository at this point in the history
This reverts commit b91c7a5.
  • Loading branch information
jstorrs committed Jul 6, 2023
1 parent ecf2e54 commit 1ff15ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 195 deletions.
6 changes: 1 addition & 5 deletions nbconvert/filters/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
"text_base64",
]

from nbconvert.filters.svg_constants import ALLOWED_SVG_ATTRIBUTES, ALLOWED_SVG_TAGS


def wrap_text(text, width=100):
"""
Expand Down Expand Up @@ -91,11 +89,9 @@ def clean_html(element):
kwargs['css_sanitizer'] = css_sanitizer
return bleach.clean(
element,
tags=[*bleach.ALLOWED_TAGS, *ALLOWED_SVG_TAGS, "div", "pre", "code", "span"],
strip_comments=False,
tags=[*bleach.ALLOWED_TAGS, "div", "pre", "code", "span"],
attributes={
**bleach.ALLOWED_ATTRIBUTES,
**{svg_tag: list(ALLOWED_SVG_ATTRIBUTES) for svg_tag in ALLOWED_SVG_TAGS},
"*": ["class", "id"],
},
**kwargs,
Expand Down
190 changes: 0 additions & 190 deletions nbconvert/filters/svg_constants.py

This file was deleted.

0 comments on commit 1ff15ce

Please sign in to comment.