Skip to content

Commit 4b84b90

Browse files
author
Zerline
committed
Little more styling.
1 parent 5514bb9 commit 4b84b90

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

packages/base-manager/src/manager-base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function default_inline_sanitize(html: string): string {
6363
'*': ['aria-*', 'style', 'title'],
6464
a: ['href'],
6565
img: ['src'],
66-
style: ['media']
66+
style: ['media', 'type']
6767
}
6868
});
6969
}

tests/test_sanitizer.ipynb

+11-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"metadata": {},
3434
"outputs": [],
3535
"source": [
36-
"Text(description=\"<p><i>italic</i></p> <p><strong>bold</strong></p>\", description_html=False)"
36+
"Text(description=\"<style type='type/css'>SPAN {text-decoration:underline;}</style><img src='jlogo-small.png' title='àçeù' /> <span style='color: orange'>NOT styled</span>\", description_html=False)"
3737
]
3838
},
3939
{
@@ -42,7 +42,16 @@
4242
"metadata": {},
4343
"outputs": [],
4444
"source": [
45-
"Text(description=\"<style type='type/css'>SPAN {text-decoration:underline;}</style><img src='jlogo-small.png' title='àçeù' /> <span style='color: orange'>a styled label</span>\", description_html=True)"
45+
"Text(description=\"<style type='type/css'>SPAN {text-decoration:underline;}</style><img src='jlogo-small.png' title='àçeù' /> <span style='color: orange'>styled</span>\", description_html=True)"
46+
]
47+
},
48+
{
49+
"cell_type": "code",
50+
"execution_count": null,
51+
"metadata": {},
52+
"outputs": [],
53+
"source": [
54+
"Textarea(description=\"<style type='type/css'>SPAN {color: blue;}</style><img src='jlogo-small.png' title='àçeù' /> <span style='text-decoration:underline;''>underlined</span>\", description_html=True)"
4655
]
4756
}
4857
],

0 commit comments

Comments
 (0)